From b61247256376246686a3c7bc9c3172e9df6579b6 Mon Sep 17 00:00:00 2001 From: Gonzalo Bellver Date: Fri, 2 Dec 2011 14:07:23 -0300 Subject: [PATCH] Thinkmapping menu removed --- mindplot/pom.xml | 2 - .../javascript/widget/ThinkmappingMenu.js | 134 ------------------ 2 files changed, 136 deletions(-) delete mode 100644 mindplot/src/main/javascript/widget/ThinkmappingMenu.js diff --git a/mindplot/pom.xml b/mindplot/pom.xml index 4875bf13..75d2ea15 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -211,8 +211,6 @@ files="widget/IconPanel.js"/> - diff --git a/mindplot/src/main/javascript/widget/ThinkmappingMenu.js b/mindplot/src/main/javascript/widget/ThinkmappingMenu.js deleted file mode 100644 index 9951f2ab..00000000 --- a/mindplot/src/main/javascript/widget/ThinkmappingMenu.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright [2011] [wisemapping] - * - * Licensed under WiseMapping Public License, Version 1.0 (the "License"). - * It is basically the Apache License, Version 2.0 (the "License") plus the - * "powered by wisemapping" text requirement on every single page; - * you may not use this file except in compliance with the License. - * You may obtain a copy of the license at - * - * http://www.wisemapping.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -mindplot.widget.ThinkmappingMenu = new Class({ - Extends: mindplot.widget.IMenu, - - initialize: function(designer, containerId, mapId) { - this.parent(designer, containerId, mapId); - - var baseUrl = "../css/widget"; - - // Stop event propagation ... - $(this._containerId).addEvent('click', function(event) { - event.stopPropagation(); - return false; - }); - - $(this._containerId).addEvent('dblclick', function(event) { - event.stopPropagation(); - return false; - }); - - // Create panels ... - var designerModel = designer.getModel(); - - // DummyModel - var dummyModel = - { - getValue : function() { - return null; - }, - setValue : function (hex) { - // Do Nothing - } - }; - this._toolbarElems.push(new mindplot.widget.PersonalisePanel('personaliseButton', dummyModel, baseUrl)); - this._toolbarElems.push(new mindplot.widget.AttachPanel('attachButton', dummyModel, baseUrl)); - this._toolbarElems.push(new mindplot.widget.SharePanel('shareButton', dummyModel, baseUrl)); - this._toolbarElems.push(new mindplot.widget.UserPanel('userButton', dummyModel, baseUrl)); - - this._addButton('newButton', function() { - var reqDialog = new MooDialog.Request('newMapDialog.htm', null, - {'class': 'newModalDialog', - closeButton:true, - destroyOnClose:true, - title:'Nouveau map' - }); - reqDialog.setRequestOptions({ - onRequest: function() { - reqDialog.setContent('loading...'); - } - }); - MooDialog.Request.active = reqDialog; - }); - - this._addButton('importButton', function() { - var reqDialog = new MooDialog.Request('importMap.htm', null, - {'class': 'importModalDialog', - closeButton:true, - destroyOnClose:true, - title:'Importez votre map' - }); - reqDialog.setRequestOptions({ - onRequest: function() { - reqDialog.setContent('loading...'); - } - }); - MooDialog.Request.active = reqDialog; - }); - this._addButton('headerMapTitle', function() { - var reqDialog = new MooDialog.Request('renameMap.htm?mapId='+mapId, null, - {'class': 'renameModalDialog', - closeButton:true, - destroyOnClose:true, - title:'Renommez votre map' - }); - reqDialog.setRequestOptions({ - onRequest: function() { - reqDialog.setContent('loading...'); - } - }); - MooDialog.Request.active = reqDialog; - }); - this._addButton('communicateButton', function() { - var reqDialog = new MooDialog.Request('sharing.htm?mapId='+mapId, null, - {'class': 'communicateModalDialog', - closeButton:true, - destroyOnClose:true, - title:'Collaboration' - }); - reqDialog.setRequestOptions({ - onRequest: function() { - reqDialog.setContent('loading...'); - } - }); - MooDialog.Request.active = reqDialog; - }); - - this._registerEvents(designer); - }, - - _registerEvents : function(designer) { - // Register on close events ... - this._toolbarElems.forEach(function(elem) { - elem.addEvent('show', function() { - this.clear() - }.bind(this)); - }.bind(this)); - }, - - _addButton:function (buttonId, fn) { - // Register Events ... - var button = new mindplot.widget.ToolbarItem(buttonId, function(event) { - fn(event); - this.clear(); - }.bind(this), {topicAction:true, relAction:true}); - this._toolbarElems.push(button); - } -})