OSDN Git Service

自ページがフレームかどうかの判断を修正。 v2.17.1
authornaoki hirata <naoki@magic3.org>
Thu, 1 Sep 2016 14:02:16 +0000 (23:02 +0900)
committernaoki hirata <naoki@magic3.org>
Thu, 1 Sep 2016 14:02:16 +0000 (23:02 +0900)
include/manager/pageManager.php
scripts/m3admin_widget2.0.10.js [moved from scripts/m3admin_widget2.0.9.js with 96% similarity]

index 7eadff8..99db4e6 100644 (file)
@@ -197,7 +197,7 @@ class PageManager extends Core
        
        // Magic3用スクリプト
        const M3_ADMIN_SCRIPT_FILENAME                  = 'm3admin1.8.7.js';                            // 管理機能用スクリプト(FCKEditor2.6.6、CKEditor4.0.1対応)
-       const M3_ADMIN_WIDGET_SCRIPT_FILENAME   = 'm3admin_widget2.0.9.js';     // 管理機能(ウィジェット操作)用スクリプト(Magic3 v1.15.0以降)
+       const M3_ADMIN_WIDGET_SCRIPT_FILENAME   = 'm3admin_widget2.0.10.js';    // 管理機能(ウィジェット操作)用スクリプト(Magic3 v1.15.0以降)
        const M3_ADMIN_WIDGET_CSS_FILE                  = '/m3/widget.css';                     // 管理機能(ウィジェット操作)用CSSファイル
        const M3_STD_SCRIPT_FILENAME                    = 'm3std1.5.2.js';                      // 一般、管理機能共通スクリプト
 //     const M3_PLUS_SCRIPT_FILENAME                   = 'm3plus1.6.2.js';                     // フロント画面追加用スクリプト(FCKEditor2.6.6対応、CKEditor4.0.1対応)
@@ -3981,7 +3981,8 @@ class PageManager extends Core
                                                $editTag .= '<i class="glyphicon glyphicon-ok-sign"></i></a></div>';
                                                $menubarTag .= $editTag;
                                                
-                                               $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window.parent && window.parent.frames.length == 0){' . M3_NL;// インラインフレームでないときパネルメニューを表示
+                               //              $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window.parent && window.parent.frames.length == 0){' . M3_NL;// インラインフレームでないときパネルメニューを表示
+                                               $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window == window.parent){' . M3_NL;// インラインフレームでないときパネルメニューを表示(修正 2016/9/1)
                                                $this->initScript .= str_repeat(M3_INDENT_SPACE, 2) . '$("body").prepend(\'' . $menubarTag . '\');' . M3_NL;            // appendでうまく表示できないのでprependで表示
                                                $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . '}' . M3_NL;
                                        } else if ($this->isAccessPointWithAdminMenu){          // 通常画面は、管理メニューを使用するアクセスポイントの場合のみ表示
@@ -4035,7 +4036,8 @@ class PageManager extends Core
                                                $menubarTag .= '</div>';
                                        //      $menubarTag .= '</div>';
 
-                                               $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window.parent && window.parent.frames.length == 0){' . M3_NL;// インラインフレームでないときパネルメニューを表示
+                                       //      $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window.parent && window.parent.frames.length == 0){' . M3_NL;// インラインフレームでないときパネルメニューを表示
+                                               $this->initScript .= str_repeat(M3_INDENT_SPACE, 1) . 'if (window == window.parent){' . M3_NL;// インラインフレームでないときパネルメニューを表示(修正 2016/9/1)
                                                $this->initScript .= str_repeat(M3_INDENT_SPACE, 2) . '$("body").append(\'' . $menubarTag . '\');' . M3_NL;
                                                //$this->initScript .= str_repeat(M3_INDENT_SPACE, 2) . '$("#m3slidemenubarpanel").m3SlideMenubar();' . M3_NL;
                                                $this->initScript .= str_repeat(M3_INDENT_SPACE, 2) . '$(".m3panel_top").m3slidepanel({ "position": "top", "type": "push" });' . M3_NL;
similarity index 96%
rename from scripts/m3admin_widget2.0.9.js
rename to scripts/m3admin_widget2.0.10.js
index ebd8914..b483634 100644 (file)
                widgetWindow += '</div>';\r
                \r
                // 画面リサイズボタン(右上)\r
-               if (!(window.parent && window.parent.frames.length == 0)){                      // 親ウィンドウありの場合\r
+               //if (!(window.parent && window.parent.frames.length == 0)){                    // 親ウィンドウありの場合\r
+               if (!(window == window.parent)){                // 親ウィンドウありの場合\r
                        widgetWindow += '<div class="m3resizer m3topright"><a href="#" rel="m3help" data-placement="bottom" data-container="body" title="画面の拡大縮小"><i class="glyphicon"></i></a></div>';\r
        }\r
                \r