File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,12 +77,25 @@ if(!$type(theWebUI.getTrackerName))
7777
7878plugin . contextMenuEntries = theWebUI . contextMenuEntries ;
7979theWebUI . contextMenuEntries = function ( labelType , el ) {
80- if ( labelType === 'ptrackers_cont' ) {
81- return plugin . canChangeMenu ( ) ? [ ] : false ;
80+ const entries = plugin . contextMenuEntries . call ( theWebUI , labelType , el ) ;
81+ if ( plugin . canChangeMenu ( ) && [ 'ptrackers_cont' , 'plabel_cont' ] . includes ( labelType ) ) {
82+ const lbl = 'ptrackers_cont' === labelType ? el . id . substr ( 1 ) : theWebUI . idToLbl ( el . id ) ;
83+ if ( lbl )
84+ return entries . concat ( [
85+ [ theUILang . EditIcon , `theWebUI.showTracklabelsDialog('${ lbl } ');` ]
86+ ] ) ;
8287 }
83- return plugin . contextMenuEntries . call ( theWebUI , labelType , el ) ;
88+ return entries ;
8489}
8590
91+
92+ theWebUI . showTracklabelsDialog = function ( lbl ) {
93+ $ ( `#${ plugin . dialogId } input[type=text]` ) . val ( lbl ) ;
94+ theDialogManager . show ( plugin . dialogId ) ;
95+ }
96+
97+
98+
8699plugin . updateLabel = theWebUI . updateLabel ;
87100theWebUI . updateLabel = function ( label , ...args )
88101{
You can’t perform that action at this time.
0 commit comments