Commit 98a7983999a0ea6b7399d65bb9853bc335c13db0
1 parent
eec153c1
Exists in
master
and in
112 other branches
anomalie 4830
Showing
3 changed files
with
31 additions
and
46 deletions
Show diff stats
desktop.php
... | ... | @@ -41,22 +41,22 @@ |
41 | 41 | <link rel="icon" href="favicon.ico" type="image/x-icon"> |
42 | 42 | <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> |
43 | 43 | |
44 | -<!-- <script type="text/javascript" src="js/lib/ext/builds/ext-core.js"></script> --> | |
45 | -<!-- <script type="text/javascript" src="js/lib/ext/bootstrap.js"></script> --> | |
46 | -<!-- <script type="text/javascript" src="js/lib/ext/ext-all-debug-w-comments.js"></script>--> | |
44 | +<!-- <script type="text/javascript" src="js/lib/ext/builds/ext-core.js"></script> --> | |
45 | +<!-- <script type="text/javascript" src="js/lib/ext/bootstrap.js"></script> --> | |
46 | +<!-- <script type="text/javascript" src="js/lib/ext/ext-all-debug-w-comments.js"></script>--> | |
47 | 47 | <script type="text/javascript" src="js/lib/ext/ext-all.js"></script> |
48 | 48 | <!-- <script type="text/javascript" src="js/lib/ext/ext-all-dev.js"> --> |
49 | - <script type="text/javascript" src="js/lib/ext-override.js"></script> | |
49 | +<!-- <script type="text/javascript" src="js/lib/ext-override.js"></script> --> | |
50 | 50 | |
51 | 51 | |
52 | 52 | |
53 | 53 | <!-- Direct API --> |
54 | - <script type="text/javascript" src="php/api.php"></script> | |
54 | + <script type="text/javascript" src="php/api.php"></script> | |
55 | 55 | |
56 | - | |
57 | - <!-- <script src="help/movies/Resources/scripts/prototype.js" language="JavaScript" type="text/javascript"></script> | |
58 | - <script src="help/movies/Resources/scripts/qtp_poster.js" language="JavaScript" type="text/javascript"></script> | |
59 | - <link href="help/movies/Resources/stylesheets/qtp_poster.css" rel="StyleSheet" type="text/css" /> ---> | |
56 | + | |
57 | +<!-- <script src="help/movies/Resources/scripts/prototype.js" language="JavaScript" type="text/javascript"></script> | |
58 | + <script src="help/movies/Resources/scripts/qtp_poster.js" language="JavaScript" type="text/javascript"></script> | |
59 | + <link href="help/movies/Resources/stylesheets/qtp_poster.css" rel="StyleSheet" type="text/css" /> ---> | |
60 | 60 | |
61 | 61 | |
62 | 62 | <script type="text/javascript"> |
... | ... |
js/app/views/ExplorerUI.js
... | ... | @@ -515,9 +515,9 @@ Ext.define('amdaUI.ExplorerUI', { |
515 | 515 | e.stopEvent(); |
516 | 516 | |
517 | 517 | // unlock selection |
518 | - view.ownerCt.getSelectionModel().setLocked(false); | |
518 | +// view.ownerCt.getSelectionModel().setLocked(false); | |
519 | 519 | // already selected by default by right click |
520 | - // view.ownerCt.getSelectionModel().select(rec,true); | |
520 | +// view.ownerCt.getSelectionModel().select(rec,true); | |
521 | 521 | |
522 | 522 | // clear menu items |
523 | 523 | menu.removeAll(); |
... | ... | @@ -531,20 +531,22 @@ Ext.define('amdaUI.ExplorerUI', { |
531 | 531 | } else if (view.ownerCt.getSelectionModel().selected.length > 1) { |
532 | 532 | // get items menu corresponding to right clicked record |
533 | 533 | menuItems = rec.getContextMenuMultiItems(this); |
534 | - } | |
535 | - | |
534 | + } | |
536 | 535 | // if there's at least one item menu |
537 | 536 | if (menuItems && menuItems.length){ |
538 | 537 | // add the items |
539 | 538 | menu.add(menuItems); |
540 | - // add listener on right clicked record | |
539 | + // add listener on right clicked record | |
541 | 540 | var onRecordClick = function (menu, item, e, eOpts) |
542 | - { | |
543 | - //Dispatch click event to the record | |
544 | - this.onMenuItemClick(menu,item,e); | |
541 | + { | |
542 | + if (this.myGetOwnerTree().getSelectionModel().isSelected(this)) { | |
543 | + //Dispatch click event to the record | |
544 | + this.onMenuItemClick(menu,item,e); | |
545 | + } | |
545 | 546 | //Remove old click listener |
546 | 547 | menu.removeListener('click',onRecordClick,this); |
547 | 548 | }; |
549 | + | |
548 | 550 | menu.addListener('click',onRecordClick,rec); |
549 | 551 | // then show menu |
550 | 552 | menu.showAt(e.getXY()); |
... | ... | @@ -626,15 +628,16 @@ Ext.define('amdaUI.ExplorerUI', { |
626 | 628 | view.deselectAll(); |
627 | 629 | } |
628 | 630 | }, |
629 | - itemmousedown: function(tree,rec,item,index,event,options){ | |
630 | - if(event.button===2){ | |
631 | - // if the right clicked item is already selected | |
632 | - if (tree.getSelectionModel().isSelected(rec)) { | |
633 | - // lock selection to prevent the selection modification by the right click | |
634 | - tree.getSelectionModel().setLocked(true); | |
635 | - } | |
636 | - } | |
637 | - }, | |
631 | +// Already done in ExtJS 4.2.4 selection model | |
632 | +// itemmousedown: function(tree,rec,item,index,event,options){ | |
633 | +// if(event.button===2){ | |
634 | +// // if the right clicked item is already selected | |
635 | +// if (tree.getSelectionModel().isSelected(rec)) { | |
636 | +// // lock selection to prevent the selection modification by the right click | |
637 | +// tree.getSelectionModel().setLocked(true); | |
638 | +// } | |
639 | +// } | |
640 | +// }, | |
638 | 641 | afterrender: function(comp){ |
639 | 642 | var view = comp.getView(); |
640 | 643 | view.tip = Ext.create('Ext.tip.ToolTip', { |
... | ... |
js/lib/ext-override.js
... | ... | @@ -96,26 +96,8 @@ Ext.onReady(function () { |
96 | 96 | } |
97 | 97 | } |
98 | 98 | });*/ |
99 | - | |
100 | - | |
101 | - Ext.override(Ext.selection.TreeModel, { | |
102 | - | |
103 | - onRowClick: function (view, record, item, index, e) { | |
104 | - // Record index will be -1 if the clicked record is a metadata record and not selectable | |
105 | - if (index !== -1) { | |
106 | - if (!this.allowRightMouseSelection(e)) { | |
107 | - return ; | |
108 | - } | |
109 | - | |
110 | - //Don't process if it's a right-click over a previously selected record. | |
111 | - // if (!(e.type === 'contextmenu' && this.isSelected(record))) { | |
112 | - this.processSelection(view, record, item, index, e); | |
113 | - // } | |
114 | - } | |
115 | - } | |
116 | - }); | |
117 | - | |
118 | - | |
99 | + | |
100 | + | |
119 | 101 | /*Ext.override(Ext.selection.Model, { |
120 | 102 | storeHasSelected: function(record) { |
121 | 103 | var store = this.store, |
... | ... |