OSDN Git Service

CKEditorの「Googleマップ」プラグイン更新。
authornaoki hirata <naoki@magic3.org>
Wed, 27 Aug 2014 14:49:43 +0000 (23:49 +0900)
committernaoki hirata <naoki@magic3.org>
Wed, 27 Aug 2014 14:49:43 +0000 (23:49 +0900)
scripts/ckeditor4.4.2/plugins/googlemaps/dialogs/main.js
scripts/ckeditor4.4.2/plugins/googlemaps/lang/en.js
scripts/ckeditor4.4.2/plugins/googlemaps/lang/ja.js

index 9d1f39a..70255da 100644 (file)
                                mapInfo.height = data.info['txtHeight'];
                                mapInfo.widthType = data.info['cmbWidthType'];
                                mapInfo.heightType = data.info['cmbHeightType'];
+                               mapInfo.alignCenter = data.info['chkAlignCenter'];
                                mapInfo.zoom = data.info['cmbZoom'];
                                mapInfo.centerLat = data.info['txtCenterLat'];
                                mapInfo.centerLon = data.info['txtCenterLon'];
 //                             newMapElement.append(scriptElement);
                                var newMapElement = CKEDITOR.dom.element.createFromHtml('<div>' + script + '</div>', editor.document);          // IE8 not work.
                                var style = 'width:' + mapInfo.width + mapInfo.widthType + ';height:' + mapInfo.height + mapInfo.heightType + ';display:none;';
+                               if (mapInfo.alignCenter) style += 'margin:0 auto;';
+                                       
                                newMapElement.setAttributes({
                                        'id': 'gmap' + mapInfo.number,
                                        'style': style,
                                {
                                        // 項目を横に配置
                                        type: 'hbox',
-                                       widths: [ '10%', '10%', '10%' ],                // 項目間幅を調整
+                                       widths: [ '10%', '10%', '10%', '20%' ],         // 項目間幅を調整
        /*                              padding: '5px',*/
                                        children: [
                                        {
                                                        [ '%', '%' ]
                                                ],
                                                commit: commitValue
+                                       }, {
+                                               type: 'checkbox',
+                                               id: 'chkAlignCenter',
+                                               label: editor.lang.googlemaps.alignCenter,
+                                               style: 'margin-top:20px;',
+                                               'default': false,
+                                               commit: commitValue
                                        } ]
                                }, {
                                        type: 'hbox',
index c4262b0..e24b93c 100644 (file)
@@ -9,7 +9,7 @@
  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
  * @copyright  Copyright 2006-2014 Magic3 Project.
  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: en.js 5979 2013-05-10 09:20:24Z fishbone $
+ * @version    1.0
  * @link       http://www.magic3.org
  */
 CKEDITOR.plugins.setLang( 'googlemaps', 'en', {
@@ -23,6 +23,7 @@ CKEDITOR.plugins.setLang( 'googlemaps', 'en', {
        height: 'Height',
        widthType: '&nbsp;',
        heightType: '&nbsp;',
+       alignCenter: 'align at center',
        zoomLevel: 'Zoom Level',
        msgDefaultMarkerText:   'Input text.'
 });
index 47a563b..1f732db 100644 (file)
@@ -9,7 +9,7 @@
  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
  * @copyright  Copyright 2006-2014 Magic3 Project.
  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
- * @version    SVN: $Id: ja.js 6030 2013-05-22 00:48:33Z fishbone $
+ * @version    1.0
  * @link       http://www.magic3.org
  */
 CKEDITOR.plugins.setLang( 'googlemaps', 'ja', {
@@ -23,6 +23,7 @@ CKEDITOR.plugins.setLang( 'googlemaps', 'ja', {
        height: '高さ',
        widthType: '&nbsp;',
        heightType: '&nbsp;',
+       alignCenter: '中央に配置',
        zoomLevel: 'ズームレベル',
        latitude: '緯度',
        longitude:      '経度',