- Timestamp:
- Aug 26, 2019 6:15:44 PM (6 years ago)
- Location:
- branches/testa-single-bookmark
- Files:
-
- 11 edited
-
css/style-3.css (modified) (3 diffs)
-
index.html (modified) (10 diffs)
-
js/bookmarkmenu.js (modified) (3 diffs)
-
js/bookmarkmgr.js (modified) (1 diff)
-
js/main.js (modified) (8 diffs)
-
js/remotex.js (modified) (5 diffs)
-
js/sidemenu.js (modified) (5 diffs)
-
js/storagex.js (modified) (10 diffs)
-
tmp/num.txt (modified) (previous)
-
tmp/script-area.txt (modified) (1 diff)
-
tmp/tmp.txt (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/testa-single-bookmark/css/style-3.css
r26 r36 11 11 .disabled { 12 12 background-color: white; 13 display: none; 13 14 } 14 15 #all { … … 57 58 grid-row: 2/3; 58 59 grid-column: 7/8; 60 } 61 62 #data-down-url, #output-down-url, #setting-down-url{ 63 grid-row: 1/2; 64 grid-column: 8/12; 65 } 66 67 #data-partial-down-url, #output-partial-down-url, #setting-partial-down-url{ 68 grid-row: 2/3; 69 grid-column: 8/12; 59 70 } 60 71 … … 136 147 } 137 148 149 #data-menu-id { 150 display: none; 151 } -
branches/testa-single-bookmark/index.html
r35 r36 8 8 <link rel="stylesheet" href="./css/style.css" /> 9 9 <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'> 10 <link rel="stylesheet" href="css/style-3.css? 7">11 <link rel="stylesheet" href="css/tab.css? 7">12 <link rel="stylesheet" href="css/menu.css? 7">10 <link rel="stylesheet" href="css/style-3.css?84"> 11 <link rel="stylesheet" href="css/tab.css?84"> 12 <link rel="stylesheet" href="css/menu.css?84"> 13 13 <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" /> 14 14 <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 15 15 <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> 16 16 <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"></script> 17 <script src="js/storagex.js? 7>"></script>18 <script src="js/sidemenu.js? 7>"></script>19 <script src="js/bookmark.js? 7>"></script>20 <script src="js/bookmarkmgr.js? 7"></script>21 <script src="js/bookmarkmenu.js? 7"></script>22 <script src="js/tab.js? 7"></script>23 <script src="js/topmenu.js? 7"></script>24 <script src="js/remotex.js? 7"></script>25 <script src="js/main.js? 7"></script>17 <script src="js/storagex.js?84>"></script> 18 <script src="js/sidemenu.js?84>"></script> 19 <script src="js/bookmark.js?84>"></script> 20 <script src="js/bookmarkmgr.js?84"></script> 21 <script src="js/bookmarkmenu.js?84"></script> 22 <script src="js/tab.js?84"></script> 23 <script src="js/topmenu.js?84"></script> 24 <script src="js/remotex.js?84"></script> 25 <script src="js/main.js?84"></script> 26 26 27 27 <!-- AREA-END --> … … 42 42 <li><a href="#">File</a> 43 43 <ul> 44 <li><a onclick="upload_to_host('data')">Save on host</a></li>45 <li><a onclick="download_cmd('part')">Download</a></li>46 <li><a class="disabled" >-Rename</a></li>47 <li><a class="disabled" >-Move</a></li>48 <li><a class="disabled" >-Delete</a></li>49 <li><a class="disabled" >-Duplicate</a></li>50 </ul> 51 </li> 52 <li ><a href="#">Dir</a>53 <ul >54 <li ><a class="disabled" href="#">-Create</a></li>55 <li ><a class="disabled" href="#">-Rename</a></li>56 <li ><a class="disabled" href="#">-Move</a></li>57 <li ><a class="disabled" href="#">-Delete</a></li>58 <li ><a class="disabled" href="#">-Duplicate</a></li>44 <li><a id="data-file-upload" onclick="Globalx['data'].remotex.upload_to_host('data')">Save on host</a></li> 45 <li><a id="data-file-download" onclick="download_cmd('part')">Download</a></li> 46 <li><a id="data-file-rename" class="disabled" >X Rename</a></li> 47 <li><a id="data-file-move"class="disabled" >X Move</a></li> 48 <li><a id="data-file-delete"class="disabled" >X Delete</a></li> 49 <li><a id="data-file-duplicate"class="disabled" >X Duplicate</a></li> 50 </ul> 51 </li> 52 <li id="data-menu-dir" class="disabled"><a href="#">Dir</a> 53 <ul class="disabled"> 54 <li id="data-dir-create" class="disabled"><a class="disabled" href="#">X Create</a></li> 55 <li id="data-dir-rename" class="disabled"><a href="#">X Rename</a></li> 56 <li id="data-dir-move" class="disabled"><a class="disabled" href="#">X Move</a></li> 57 <li id="data-dir-delete" class="disabled"><a class="disabled" href="#">X Delete</a></li> 58 <li id="data-dir-duplicate" class="disabled"><a class="disabled" href="#">X Duplicate</a></li> 59 59 </ul> 60 60 </li> … … 65 65 <li><a href="#">Build</a> 66 66 <ul> 67 <li><a href="#">Build</a></li> 68 <li><a href="#" onclick="get_filelist()">Get FileList</a></li> 69 <li><a href="#" onclick="update_filelist()">Forced to get FileList</a></li> 70 <li><a href="#" onclick="restore_filelist(0, '/rtk/fmp_kernel')">Restore FileList</a></li> 71 </ul> 72 </li> 73 <li class="disabled"><a href="#">History</a> 74 <ul> 75 </ul> 76 67 <li><a id="data-build-build" href="#">Build</a></li> 68 <li><a id="data-build-get-filelist" href="#" onclick="get_filelist()">Get FileList</a></li> 69 <li><a id="data-build-forced-to-get-filelist" href="#" onclick="update_filelist()">Forced to get FileList</a></li> 70 <li><a id="data-build-restore-filelist" href="#" onclick="restore_filelist(0, '/rtk/fmp_kernel')">Restore FileList</a></li> 71 </ul> 72 </li> 77 73 <li><a href="#">config</a> 78 74 <ul> … … 84 80 </ul> 85 81 </li> 82 <li class="disabled"><a href="#">History</a> 83 <ul> 84 </ul> 85 86 86 </ul> 87 87 </div> … … 94 94 <input type="text" id="data-filelist_key" value="/" /> 95 95 <label id="data-bookmark_label"> 96 <!-- <input type="checkbox" id="data-bookmark_op" value="2" onclick="bookmark_op('data')"> --> 97 <input type="checkbox" id="data-bookmark_op" disabled> 96 <input type="checkbox" id="data-bookmark_op" > 98 97 BK 99 98 </label> 100 99 <a id="data-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 100 <a id="data-down-url"></a> 101 <a id="data-partial-down-url"></a> 101 102 </div> 102 103 <div id="data-side" ></div> … … 110 111 <li><a href="#">File</a> 111 112 <ul> 112 <li><a onclick="upload_to_host('data')">Save on host</a></li>113 <li><a onclick="download_cmd('part')">Download</a></li>114 <li><a class="disabled" >-Rename</a></li>115 <li><a class="disabled" >-Move</a></li>116 <li><a class="disabled" >-Delete</a></li>117 <li><a class="disabled" >-Duplicate</a></li>118 </ul> 119 </li> 120 <li ><a href="#">Dir</a>121 <ul> 122 <li><a class="disabled" href="#">-Create</a></li>123 <li><a class="disabled" href="#">-Rename</a></li>124 <li><a class="disabled" href="#">-Move</a></li>125 <li><a class="disabled" href="#">-Delete</a></li>126 <li><a class="disabled" href="#">-Duplicate</a></li>113 <li><a id="output-file-upload" onclick="upload_to_host('data')">Save on host</a></li> 114 <li><a id="output-file-download" class="disabled" >-Download</a></li> 115 <li><a id="output-file-rename" class="disabled" >-Rename</a></li> 116 <li><a id="output-file-move" class="disabled" >-Move</a></li> 117 <li><a id="output-file-delete" class="disabled" >-Delete</a></li> 118 <li><a id="output-file-duplicate" class="disabled" >-Duplicate</a></li> 119 </ul> 120 </li> 121 <li class="disabled"><a href="#">Dir</a> 122 <ul> 123 <li><a id="output-dir-create" class="disabled" href="#">-Create</a></li> 124 <li><a id="output-dir-rename" class="disabled" href="#">-Rename</a></li> 125 <li><a id="output-dir-move" class="disabled" href="#">-Move</a></li> 126 <li><a id="output-dir-delete" class="disabled" href="#">-Delete</a></li> 127 <li><a id="output-dir-duplicate" class="disabled" href="#">-Duplicate</a></li> 127 128 </ul> 128 129 </li> … … 147 148 <input type="text" id="output-filelist_key" value="/" /> 148 149 <label id="output-bookmark_label"> 149 <!-- <input type="checkbox" id="output-bookmark_op" onclick="bookmark_op('data')"> --> 150 <input type="checkbox" id="output-bookmark_op" disabled> 150 <input type="checkbox" id="output-bookmark_op"> 151 151 BK 152 152 </label> 153 153 <a id="output-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 154 <a id="output-down-url"></a> 155 <a id="output-partial-down-url"></a> 154 156 155 157 </div> … … 165 167 <li><a href="#">File</a> 166 168 <ul> 167 <li><a onclick="upload_to_host('data')">Save on host</a></li>168 <li><a onclick="download_cmd('part')">Download</a></li>169 <li><a class="disabled" >-Rename</a></li>170 <li><a class="disabled" >-Move</a></li>171 <li><a class="disabled" >-Delete</a></li>172 <li><a class="disabled" >-Duplicate</a></li>173 </ul> 174 </li> 175 <li ><a href="#">Dir</a>176 <ul> 177 <li><a class="disabled" href="#">-Create</a></li>178 <li><a class="disabled" href="#">-Rename</a></li>179 <li><a class="disabled" href="#">-Move</a></li>180 <li><a class="disabled" href="#">-Delete</a></li>181 <li><a class="disabled" href="#">-Duplicate</a></li>169 <li><a id="setting-file-upload" onclick="upload_to_host('data')">Save on host</a></li> 170 <li><a id="setting-file-download" onclick="download_cmd('part')">Download</a></li> 171 <li><a id="setting-file-rename" class="disabled" >-Rename</a></li> 172 <li><a id="setting-file-move" class="disabled" >-Move</a></li> 173 <li><a id="setting-file-delete" class="disabled" >-Delete</a></li> 174 <li><a id="setting-file-duplicate" class="disabled" >-Duplicate</a></li> 175 </ul> 176 </li> 177 <li class="disabled"><a href="#">Dir</a> 178 <ul> 179 <li><a id="setting-dir-create" class="disabled" href="#">-Create</a></li> 180 <li><a id="setting-dir-rename" class="disabled" href="#">-Rename</a></li> 181 <li><a id="setting-dir-move" class="disabled" href="#">-Move</a></li> 182 <li><a id="setting-dir-delete" class="disabled" href="#">-Delete</a></li> 183 <li><a id="setting-dir-duplicate" class="disabled" href="#">-Duplicate</a></li> 182 184 </ul> 183 185 </li> 184 186 <li><a href="#">Bookmark</a> 185 <ul id=" output-bookmark">187 <ul id="setting-bookmark"> 186 188 </ul> 187 189 </li> … … 202 204 <input type="text" id="setting-filelist_key" value="/" /> 203 205 <label id="setting-bookmark_label"> 204 <!-- <input type="checkbox" id="setting-bookmark_op" onclick="bookmark_op('data')"> --> 205 <input type="checkbox" id="setting-bookmark_op" disabled> 206 <input type="checkbox" id="setting-bookmark_op" > 206 207 BK 207 208 </label> 208 209 <a id="setting-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 210 <a id="setting-down-url"></a> 211 <a id="setting-partial-down-url"></a> 209 212 </div> 210 213 <div id="setting-side"> … … 234 237 </script> 235 238 </body> 236 </html> -
branches/testa-single-bookmark/js/bookmarkmenu.js
r29 r36 1 1 class BookmarkMenu { 2 constructor(num, part) { 3 this.num = num 4 this.part = part 5 this.bookmark_op_sel = Globalx[part].bookmark_op_sel 6 this.bookmark_mgr = Globalx[part].bookmark_mgr 7 this.bookmark_sel = Globalx[part].bookmark_sel 8 this.key_sel = Globalx[part].key_sel 9 this.editor = Globalx[part].editor 10 this.textarea_sel = Globalx[part].textarea_sel 11 this.menu_sel = Globalx[part].menu_sel 2 constructor( bookmark_displayname_max_length , mgr ) { 3 this.bookmark_displayname_max_length = bookmark_displayname_max_length 4 this.bookmark_mgr = mgr 5 } 6 7 dlg(){ 8 console.log("BookmarkMenu dlg()") 9 $( '#bookmark_displayname' ).prop( 'maxlength' , Globalx.bookmark_displayname_max_length) 10 $('#bookmarkDlg').dialog({ 11 autoOpen: false, 12 modal: true, 13 buttons: { 14 "OK": function() { 15 const part = Globalx.parts[ Globalx.index ] 16 const path = $( '#bookmark_path' ).val() 17 const displayname = $( '#bookmark_displayname' ).val() 18 Globalx.bookmarkmenu.register_bookmark(path, displayname ) 19 $(this).dialog("close")}, 20 "Cancel": function() { 21 const part = Globalx.parts[ Globalx.index ] 22 const bookmark_cb = $( Globalx[part].bookmark_op_sel ) 23 bookmark_cb.prop('checked', false) 24 $(this).dialog("close") 25 } 26 } 27 }) 12 28 } 13 29 14 30 add_bookmark() { 15 $( '#bookmark_displayname' ).val( Globalx[this.part].bookmark_mgr.get_restricted_display_name( Globalx[this.part].key ) ) 16 $( '#bookmark_path' ).val( Globalx[this.part].key ) 31 let part = Globalx.parts[ Globalx.index ] 32 console.log("add_bookmark part=" + part) 33 $( '#bookmark_displayname' ).val( this.bookmark_mgr.get_restricted_display_name( Globalx[part].key ) ) 34 $( '#bookmark_path' ).val( Globalx[part].key ) 17 35 $( '#bookmarkDlg' ).dialog("open") 18 36 } 19 37 20 38 remove_bookmark() { 21 this.bookmark_mgr.remove( Globalx[this.part].key ) 22 this.rebuild_bookmark_menu() 39 let part = Globalx.parts[ Globalx.index ] 40 console.log("remove_bookmark part=" + part) 41 this.bookmark_mgr.remove( part, Globalx[part].key ) 42 this.rebuild_bookmark_menu(part) 23 43 } 24 44 25 45 bookmark_op() { 26 if( $( this.bookmark_op_sel ).is(':checked') == true ){ 46 let part = Globalx.parts[ Globalx.index ] 47 let bookmark_op_sel = Globalx[part].bookmark_op_sel 48 console.log("bookmark_op part=" + part + " bookmark_op_sel=" + bookmark_op_sel) 49 if( $( bookmark_op_sel ).is(':checked') == true ){ 27 50 this.add_bookmark() 28 51 } … … 32 55 } 33 56 34 set_click_handler() { 35 console.log( "set_click_handler() part=" + this.part + " num=" + this.num ) 36 $( this.bookmark_op_sel ).on( 'click' , () => { this.bookmark_op() } ) 57 set_click_handler(part) { 58 let bookmark_op_sel = Globalx[part].bookmark_op_sel 59 60 console.log( "set_click_handler() part=" + part + " bookmark_op_sel=" + bookmark_op_sel ) 61 $( bookmark_op_sel ).on( 'click' , () => { 62 console.log("bookmark_op_sel clicked") 63 this.bookmark_op() } ) 37 64 } 38 65 39 register_bookmark_( path, displayname ) { 40 this.bookmark_mgr.add( path , displayname ) 41 this.rebuild_bookmark_menu() 66 register_bookmark( path, displayname ) { 67 let part = Globalx.parts[ Globalx.index ] 68 console.log("BookmarkMenu register_bookmark part="+part+" path="+path) 69 this.bookmark_mgr.add( part, path , displayname ) 70 this.rebuild_bookmark_menu(part) 42 71 } 43 72 44 rebuild_bookmark_menu() { 45 $( this.bookmark_sel ).empty() 73 rebuild_bookmark_menu(part) { 74 let num = Globalx.num 75 let bookmark_sel = Globalx[part].bookmark_sel 76 console.log("BookmarkMenu rebuld_bookmark_menu num="+num+ " part="+part) 77 $( bookmark_sel ).empty() 46 78 47 const array = this.bookmark_mgr.get_paths() 79 const array = this.bookmark_mgr.get_paths(part) 80 console.log("BookmarkMenu rebuld_bookmark_menu array=" + array ) 48 81 82 let content = null 83 let item = null 49 84 array.map( ( path ) => { 50 const display_name = this.bookmark_mgr.display_name( path ) 51 content = `<li><a href="#" onclick="this.bookmark_action( '${this.part}' , '${this.path}' )">${display_name}</a></li>`; 52 $( this.bookmark_sel ).append(content); 85 const display_name = this.bookmark_mgr.display_name( part, path ) 86 content = `<li><a href="#" >${display_name}</a></li>`; 87 console.log("BookmarkMenu rebuld_bookmark_menu content=" + content) 88 $( bookmark_sel ).append( content ); 89 console.log( "bookmark_sel="+bookmark_sel) 90 item = $( bookmark_sel ).last() 91 console.log( "item=" + item ) 92 item.on('click' , () => { 93 console.log("BookmarkMenu rebuld_bookmark_menu bookmark_action part="+part + " path" + path ) 94 this.bookmark_action( part , path ) 95 } ) 96 console.log("BookmarkMenu rebuld_bookmark_menu path=" + path ) 53 97 }) 98 } 99 100 set_globalx_item_name( part, item_name ) { 101 Globalx[part].item_name = item_name 102 let dl = $( Globalx[part].download_sel ) 103 dl.attr('download' , Globalx[part].item_name) 104 dl.removeAttr('href') 54 105 } 55 106 … … 62 113 return 63 114 } 64 65 let realData = Globalx.remotex.get_filelist( this.num)115 let num = Globalx.num 116 let jsondata = Globalx.storagex.get_filelist( Globalx.num , part) 66 117 Globalx[part].key = key 67 118 Globalx[part].key_indicate_file = false; 68 119 69 120 this.set_globalx_item_name( part, key ) 70 $( this.key_sel ).val( key )71 121 72 if( realData[Globalx[part].key].length == 0 ){ 122 $( Globalx[part].key_sel ).val( key ) 123 console.log("jsondata=" + jsondata) 124 if( jsondata[key].length == 0 ){ 73 125 Globalx[part].key_indicate_file = true; 74 Globalx.remotex.get_content( this.num, this.part, Globalx[part].key , (content) => {75 this.editor.getSession().setValue( content );76 $( this.textarea_sel ).val( content );126 Globalx.remotex.get_content( num, part, Globalx[part].key , (content) => { 127 Globalx[part].editor.getSession().setValue( content ) 128 $( Globalx[part].textarea_sel ).val( content ) 77 129 }); 78 130 } 79 131 else{ 80 132 Globalx[part].key_indicate_file = false 81 this.editor.getSession().setValue( "" );82 $( this.textarea_sel ).val( "" );133 Globalx[part].editor.getSession().setValue( "" ); 134 $( Globalx[part].textarea_sel ).val( "" ); 83 135 } 84 const bookmark_cb = $( this.bookmark_op_sel )136 const bookmark_cb = $( Globalx[part].bookmark_op_sel ) 85 137 bookmark_cb.prop('checked', true) 86 138 87 $( this.menu_sel ).empty()139 $( Globalx[part].menu_sel ).empty() 88 140 89 this.rebuild_bookmark_menu() 90 // this.make_menu_item_list(realData, Globalx[part].key) 141 this.make_menu_item_list(jsondata, Globalx[part].key) 91 142 } 92 143 } -
branches/testa-single-bookmark/js/bookmarkmgr.js
r25 r36 1 1 class BookmarkMgr { 2 constructor( max_display_name_length ) { 3 this.paths = [] 2 constructor( max_display_name_length , parts ) { 3 this.paths = {} 4 5 this.parts = parts 6 this.parts.map( (part) => { 7 this.paths[part] = [] 8 } ) 4 9 this.items = {} 10 this.parts.map( (part) => { 11 this.items[part] = {} 12 } ) 5 13 this.max_display_name_length = max_display_name_length 6 14 } 7 15 8 add( path , display_name = null){ 9 let result = this.paths.indexOf( path ) 16 add( part, path , display_name = null){ 17 console.log("BookmarkMgr add part=" + part + " path="+ path) 18 let result = this.paths[part].indexOf( path ) 10 19 if( result < 0 ){ 11 this.paths .push( path )12 this.items[ path ] = new Bookmark( path , this.max_display_name_length , display_name )20 this.paths[part].push( path ) 21 this.items[part][ path ] = new Bookmark( path , this.max_display_name_length , display_name ) 13 22 } 14 return this.items[ path ]23 return this.items[part][ path ] 15 24 } 16 25 17 remove( pa th ){18 let result = this.paths .indexOf( path )26 remove( part, path ){ 27 let result = this.paths[part].indexOf( path ) 19 28 if( result >= 0 ){ 20 delete this.items[ path ]21 delete this.paths[ result ]29 delete this.items[part][ path ] 30 delete this.paths[part][ result ] 22 31 } 23 32 } 24 33 25 get( pa th ){34 get( part, path ){ 26 35 let ret = null 27 let result = this.paths .indexOf( path )36 let result = this.paths[part].indexOf( path ) 28 37 if( result >= 0 ){ 29 ret = this.items[ path ]38 ret = this.items[part][ path ] 30 39 } 31 40 return ret 32 41 } 33 42 34 display_name( pa th ){35 let result = this.paths .indexOf( path )43 display_name( part, path ){ 44 let result = this.paths[part].indexOf( path ) 36 45 let disp = null 37 46 if( result >= 0 ){ 38 disp = this.items[ path ].display_name47 disp = this.items[part][ path ].display_name 39 48 } 40 49 return disp 41 50 } 42 51 43 get_paths( ){44 return this.paths 52 get_paths(part){ 53 return this.paths[part] 45 54 } 46 55 47 get_display_names( ){48 const array = thils.paths 56 get_display_names(part, path){ 57 const array = thils.paths[part] 49 58 return array.map( function( path ){ 50 return this.items[ path ].display_name59 return this.items[part][ path ].display_name 51 60 } ) 52 61 } 53 62 54 63 get_restricted_display_name( path ){ 55 return path.substr( - this.max_display_name_length)64 return path.substr( -(this.max_display_name_length) ) 56 65 } 57 66 58 get_items( ) {59 return this.items 67 get_items(part) { 68 return this.items[part] 60 69 } 61 70 -
branches/testa-single-bookmark/js/main.js
r27 r36 1 1 let Globalx = {}; 2 let GlobalxInitValue = { 2 const GlobalxItems = ["output_url"] 3 const GlobalxInitValue = { 3 4 editor: null, 4 5 key_indicate_file: false, 5 6 key: '/' 6 7 }; 8 const GlobalxInitValueItems = ["editor", "key_indicate_file", "key"] 7 9 8 10 function init_globalx_storagex() { … … 11 13 12 14 function init_globalx() { 13 Globalx.num = 0 ;14 Globalx.index = 0 ;15 Globalx.num = 0 16 Globalx.index = 0 15 17 Globalx.parts = ["data", "output", "setting"] 16 18 Globalx.bookmark_displayname_max_length = 18 19 Globalx.output_url = null 17 20 18 21 tab_init() 19 22 topmenu_init() 20 23 Globalx.remotex = new Remotex('php/content.php') 24 console.log( "init_globalx 1 : Globalx.bookmark_mgr=" + Globalx.bookmark_mgr ) 25 if( Globalx.bookmark_mgr === null || Globalx.bookmark_mgr === undefined ){ 26 Globalx.bookmark_mgr = new BookmarkMgr(Globalx.bookmark_displayname_max_length, Globalx.parts) 27 } 28 console.log( "init_globalx 2 : Globalx.bookmark_mgr=" + Globalx.bookmark_mgr ) 29 Globalx.bookmarkmenu = null 21 30 } 22 31 23 function menu_action(part, item_name , up_flag = false) { 24 //console.log("menu_action 1") 25 Globalx[part].sidemenu.menu_action(item_name , up_flag) 26 //console.log("menu_action 2") 32 async function get_output_url_async( func ){ 33 let realData = Globalx.storagex.get_output_url() 34 35 if( realData === undefined || realData === null ){ 36 await Globalx.remotex.get_output_url( func ) 37 } 38 else{ 39 const obj = Globalx.storagex.get_output_url( num , part ) 40 Globalx.output_url = obj.output_url 41 Globalx.storagex.save_as_info_from_globalx() 42 } 43 } 44 45 async function setup(){ 46 get_output_url_async( (text) => { 47 let str = text 48 let obj 49 if( str.match( /{.*}/ ) === null ){ 50 obj = {} 51 } 52 else { 53 obj = JSON.parse( str ) 54 } 55 Globalx.storagex.change_cache( obj, this.num , this.part ) 56 } ) 27 57 } 58 28 59 29 60 function main() { … … 32 63 let need_to_save = Globalx.storagex.restore_globalx_from_info() 33 64 init_globalx() 65 setup() 66 67 console.log("##### Globalx.bookmarkmenu=" + Globalx.bookmarkmenu) 68 console.log("##### Globalx.bookmark_mgr=" + Globalx.bookmark_mgr) 69 Globalx.bookmarkmenu = new BookmarkMenu( Globalx.bookmark_displayname_max_length , Globalx.bookmark_mgr ) 70 Globalx.bookmarkmenu.dlg() 34 71 35 72 Globalx.parts.map( ( part ) => { 36 73 set_globalx_editor(part) 37 Globalx[ part ].bookmarkmenu = new BookmarkMenu( Globalx.num, part ) 74 38 75 Globalx[ part ].sidemenu = new SideMenu( Globalx.num, part ) 39 76 Globalx[ part ].sidemenu.setup(`#${part}-side`) 40 Globalx[ part ].bookmarkmenu.set_click_handler()41 Globalx[ part ].bookmarkmenu.rebuild_bookmark_menu(part)42 77 43 78 $( Globalx[ part ].download_sel ).on('click', {num: Globalx.num, part: part}, handleDownload) 44 79 $( Globalx[ part ].textarea_sel ).val(""); 80 Globalx.bookmarkmenu.rebuild_bookmark_menu(part) 81 Globalx.bookmarkmenu.set_click_handler(part) 45 82 } ) 46 /*47 Globalx.parts.map( (part) => {48 Globalx[ part ].sidemenu.setup(`#${part}-side`)49 Globalx[ part ].bookmarkmenu.rebuild_bookmark_menu(part)50 83 51 $( Globalx[part].download_sel ).on('click', {num: Globalx.num, part: part}, handleDownload)52 $( Globalx[part].textarea_sel ).val("");53 }54 */55 84 if( need_to_save ){ 56 85 // LocalStorageにまだ保存していない場合、ここで保存しておく … … 58 87 Globalx.storagex.save_as_info_from_globalx( (data) => { console.log( "data=" + data ) } ) 59 88 } 60 61 let part = "data" 62 $( '#bookmark_displayname' ).prop( 'maxlength' , Globalx.bookmark_displayname_max_length) 63 $('#bookmarkDlg').dialog({ 64 autoOpen: false, 65 modal: true, 66 buttons: { 67 "OK": function() { 68 part = Globalx.parts[ Globalx.index ] 69 path = $( '#bookmark_path' ).val() 70 displayname = $( '#bookmark_displayname' ).val() 71 register_bookmark_( part , path, displayname ) 72 $(this).dialog("close")}, 73 "Cancel": function() { 74 bookmark_cb.prop('checked', false) 75 $(this).dialog("close") 76 } 77 } 78 }) 89 /* 90 Object.keys(Globalx).forEach((key) => { 91 console.log(key) 92 }) */ 79 93 } 80 94 … … 83 97 Globalx[part] = { 84 98 editor_id: `${part}-editor`, 85 editor: null, 99 editor: null, /* variable */ 86 100 textarea_sel: `textarea[name=${part}-editor-t`, 87 101 /**/ … … 91 105 item_name: "", 92 106 /**/ 93 bookmarks: [], 94 key_indicate_file: false, 95 key: '/', 107 bookmarks: [], 108 key_indicate_file: false, /* variable */ 109 key: '/', 96 110 key_sel: `#${part}-filelist_key`, 97 download_sel: `#${part}-down-download` 111 download_sel: `#${part}-down-download`, 112 download_url_sel: `#${part}-down-url`, 113 download_partial_url_sel: `#${part}-partial-down-url` 98 114 } 99 115 editor_config(part); … … 102 118 Globalx[part].bookmark_sel = `#${Globalx[part].bookmark_id}` 103 119 Globalx[part].bookmark_op_sel = `#${Globalx[part].bookmark_op_id}` 104 Globalx[part].bookmark_mgr = new BookmarkMgr( Globalx.bookmark_displayname_max_length )105 120 } 106 121 … … 113 128 editor.getSession().setTabSize(2); 114 129 Globalx[part].editor = editor; 115 let textarea = $( Globalx[part].textarea_sel ); 116 Globalx[part].textarea = textarea;117 editor.getSession().on("change", function (){118 Globalx[part].textarea.val(editor.getSession().getValue());130 131 let textarea = $( Globalx[part].textarea_sel ) 132 editor.getSession().on("change", (textarea) => { 133 textarea.val(editor.getSession().getValue()); 119 134 }); 120 135 } -
branches/testa-single-bookmark/js/remotex.js
r29 r36 3 3 constructor( filename ){ 4 4 this.filename = filename 5 // this.num = num6 // this.part = part5 // this.num = num 6 // this.part = part 7 7 } 8 8 … … 17 17 18 18 async get_filelist_from_remote( num, part, func ) { 19 console.log("remotex get_filelist_from_remote num=" + num + " part=" + part )19 console.log("remotex get_filelist_from_remote num=" + num + " part=" + part ) 20 20 let param_array = [['cmd', 'get_filelistx'], ['num', num ], ['part', part ]] 21 21 await this.fetchx( this.filename , param_array, func ) … … 23 23 24 24 async update_filelist( num, part, func ) { 25 console.log("remotex update_filelist num=" + num + " part=" + part )25 console.log("remotex update_filelist num=" + num + " part=" + part ) 26 26 let param_array = [['cmd', 'update_filelistx'], ['num', num ], ['part', part ]] 27 27 await this.fetchx( this.filename , param_array, func ) … … 29 29 30 30 async get_content(num, part, path , func) { 31 console.log("remotex get_content num=" + num + " part=" + part )31 console.log("remotex get_content num=" + num + " part=" + part ) 32 32 console.log("part=" + part) 33 33 let param_array = [['cmd', 'get_content'], ['num', num ], ['part', part ], ['path', path]] … … 35 35 } 36 36 37 async get_output_url(num, func) { 38 console.log("get_output_url") 39 console.log("remotex get_output_url num=" + num ) 40 let param_array = [['cmd', 'get_output_url'], ['num', num ] ] 41 await this.fetchx( this.filename , param_array, func ) 42 } 43 37 44 async fetchx( filename, param_array, func) { 45 console.log("fetchx func" + func) 38 46 let params = this.make_url_params( param_array ) 39 47 fetch(`${filename}?${params}`) 40 48 .then((response) => response.text()) 41 .then((text) => { console.log(func) ; func(text)}) 49 .then((text) => { console.log(func) ; if( func !== undefined ){func(text)} else { console.log("func=undefined")} }) 50 .catch((error) => console.log(error)); 51 } 52 53 upload_to_host(part) { 54 if( Globalx[part].key_indicate_file === true ){ 55 let textarea = $( Globalx[part].textarea_sel ) 56 upload_content(Globalx.num, part, Globalx[part].key, textarea.val()) 57 } 58 } 59 60 upload_content(num, part, path, content) { 61 let form = document.createElement('form'); 62 let req_content = document.createElement('input'); 63 let req_path = document.createElement('input'); 64 let req_cmd = document.createElement('input'); 65 let req_num = document.createElement('input'); 66 67 document.body.appendChild(form); 68 req_content.type = 'hidden'; 69 req_content.name = 'mytext'; 70 req_content.value = content; 71 72 req_path.type = 'hidden'; 73 req_path.name = 'path'; 74 req_path.value = path; 75 76 req_cmd.type = 'hidden'; 77 req_cmd.name = 'cmd'; 78 req_cmd.value = 'upload_content'; 79 80 req_num.type = 'hidden'; 81 req_num.name = 'num'; 82 req_num.value = num + ''; 83 84 form.appendChild(req_content); 85 form.appendChild(req_path); 86 form.appendChild(req_cmd); 87 form.appendChild(req_num); 88 89 // FormDataオブジェクトを作成する 90 var form_data = new FormData(form); 91 92 fetch('php/content.php', { 93 method: 'POST', 94 mode: 'same-origin', /* 'no-cors' 'cors' 'same-origin' */ 95 body: form_data 96 }) 97 .then((response) => response.text()) 98 .then((data) => console.log(data)) 42 99 .catch((error) => console.log(error)); 43 100 } 44 101 45 102 handleDownload(e) { 46 let dl = document.getElementById( "data-down-download")103 let dl = document.getElementById(`${e.data.part}-down-download`) 47 104 48 105 if( Globalx[ e.data.part ].key_indicate_file === true ){ -
branches/testa-single-bookmark/js/sidemenu.js
r29 r36 70 70 71 71 menu_action( item_name , up_flag = false ) { 72 if( Globalx[this.part].key != '/' ){73 74 }75 72 let part = this.part 76 73 let jsondata = Globalx.storagex.get_filelist( Globalx.num , part) … … 124 121 if( jsondata[Globalx[part].key].length == 0 ){ 125 122 Globalx[part].key_indicate_file = true; 123 let url = "" 124 $( Globalx[part].download_url_sel ).val( Globalx[part].key ) 125 $( Globalx[part].download_url_sel ).attr('href' , url ) 126 $( Globalx[part].download_partial_url_sel ).val( Globalx[part].key + "(parial)" ) 127 url = url + ".tmp" 128 $( Globalx[part].download_partial_url_sel ).attr('href' , url ) 126 129 Globalx.remotex.get_content( this.num, this.part, Globalx[part].key , (content) => { 127 130 //console.log("content=" + content) … … 135 138 make_menu_item_list( realData , key){ 136 139 let content = null 140 let item = null 137 141 let ary = realData[ key ] 138 142 139 143 let name = '..(Up)' 140 content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="menu_action( '${this.part}', '${this.name}', true)">${name}</div></li>`; 144 content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu">${name}</div></li>`; 145 // content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="menu_action( '${this.part}', '${this.name}', true)">${name}</div></li>`; 141 146 // content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="this.menu_action_2">${name}</div></li>`; 142 147 $( this.menu_sel ).append(content); 148 item = $( this.menu_sel ).last() 149 item.on('click' , () => { 150 this.menu_action( key , true ) 151 } ) 143 152 144 153 if( ary !== undefined ){ 145 154 ary.map( ( item_name ) => { 146 content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="menu_action( '${this.part}', '${item_name}' , false)">${item_name}</div></li>`; 155 content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu">${item_name}</div></li>`; 156 // content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="menu_action( '${this.part}', '${item_name}' , false)">${item_name}</div></li>`; 147 157 // content = `<li class="ui-menu-item"><div class="ui-menu-item-wrapper hasmenu" onclick="this.menu_action_2">${item_name}</div></li>`; 148 158 $( this.menu_sel ).append(content); 159 item = $( this.menu_sel ).last() 160 item.on('click' , () => { 161 this.menu_action( item_name ) 162 } ) 149 163 }) 150 164 } … … 153 167 set_globalx_item_name( item_name ) { 154 168 Globalx[this.part].item_name = item_name 155 let dl = $( '#download')169 let dl = $( Globalx[ this.part ].download_sel ) 156 170 dl.attr('download' , Globalx[this.part].item_name) 157 171 dl.removeAttr('href') … … 175 189 } 176 190 } 191 192 /* 193 function menu_action(part, item_name , up_flag = false) { 194 Globalx[part].sidemenu.menu_action(item_name , up_flag) 195 } 196 */ -
branches/testa-single-bookmark/js/storagex.js
r29 r36 2 2 constructor () { 3 3 this._globalStorage = {} 4 this._items = ["num", "index", "parts"]4 this._items = GlobalxItems 5 5 } 6 6 … … 36 36 this.copy_obj_with_part(info, Globalx, part) 37 37 38 info [part].bookmark_mgr = this.convert_to_plain_object_from_bookmark_mgr(Globalx[part].bookmark_mgr)38 info.bookmark_mgr = this.convert_to_plain_object_from_bookmark_mgr(Globalx.bookmark_mgr) 39 39 } 40 40 … … 42 42 this._globalStorage[key] = obj 43 43 localStorage.setItem(key , JSON.stringify(obj) ) 44 } 45 46 change_cache_x( obj ){ 47 this._globalStorage[key] = obj 48 // localStorage.setItem(key , JSON.stringify(this._globalStorage[key]) ) 44 49 } 45 50 … … 50 55 } 51 56 52 convert_to_array_from_bookmark_mgr(mgr){ 53 return { 54 paths: mgr.get_paths(), 55 items: mgr_to_array(mgr), 56 max_display_name_length: mgr.max_display_name_length() 57 } 57 async convert_mgr_object_async( mgr, array ){ 58 return await array.map( (path) => { 59 const item = mgr.get(part , path) 60 return { 61 part: part, 62 path: item.path, 63 display_name: item.display_name 64 } 65 }) 58 66 } 59 67 60 68 convert_to_plain_object_from_bookmark_mgr(mgr){ 61 const paths = mgr.get_paths() 62 const new_bk_items = paths.map( ( path ) => { 63 let ret = { 64 path: "", 65 display_name: "" 66 } 67 item = mgr.get(path) 68 if( item != null ){ 69 ret.path = path 70 ret.display_name = item.display_name 71 } 72 return ret 73 } ) 74 75 return { 76 max_display_name_length: mgr.max_display_name_length, 77 items: new_bk_items 78 } 69 let obj = {} 70 obj.bms = {} 71 72 Object.entries( mgr.paths ).map( ([part, array]) => { 73 obj.bms[part] = this.convert_mgr_object_async(mgr, array) 74 } ) 75 76 obj.max_display_name_length = mgr.max_display_name_length 77 obj.parts = mgr.parts 78 79 return obj 80 } 81 82 convert_to_plain_object_from_bookmark_mgr0(mgr){ 83 let obj = {} 84 obj.bms = Object.fromEntries( Object.entries( mgr.paths ).map( ([part, array]) => { 85 const bk_items = this.convert_mgr_object_async(mgr, array) 86 87 ([part, bk_items]) 88 } ) ) 89 obj.max_display_name_length = mgr.max_display_name_length 90 obj.parts = mgr.parts 91 92 return obj 79 93 } 80 94 81 95 copy_obj_with_part(to_obj, from_obj, part){ 82 const items = ["editor_id", "textarea_sel" , "menu_id", "bookmark_id", "bookmark_op_id", "item_name", "bookmarks", "key_sel", "download_sel", "menu_sel", "bookmark_sel", "bookmark_op_sel", "bookmark_mgr" ] 83 const init_value_items = ["editor", "key_indicate_file", "key"] 84 96 const items = [ 97 "editor_id", 98 "textarea_sel" , 99 "menu_id", 100 "bookmark_id", 101 "bookmark_op_id", 102 "item_name", 103 "bookmarks", 104 "key", 105 "key_sel", 106 "download_sel", 107 "download_url_sel", 108 "download_partial_url_sel", 109 "menu_sel" , 110 "bookmark_mgr" , 111 "bookmark_op_sel" 112 ] 85 113 if( to_obj[part] === undefined ){ 86 114 to_obj[part] = {} 87 115 } 88 116 this.copy_object( to_obj[part], from_obj[part], items ) 89 this.copy_object( to_obj[part], GlobalxInitValue, init_value_items )117 this.copy_object( to_obj[part], GlobalxInitValue, GlobalxInitValueItems ) 90 118 } 91 119 … … 115 143 if( str ){ 116 144 ret = this._globalStorage[key] = JSON.parse(str) 117 // console.log(" rfl 1 key=" + key + " str=" + str)145 // console.log("### rfl 1 key=" + key + " str=" + str) 118 146 } 119 147 else{ … … 122 150 } 123 151 ret = this._globalStorage[key] 124 console.log("rfl 2 key=" + key + " undefined")152 // console.log("### rfl 2 key=" + key + " undefined") 125 153 } 126 154 … … 132 160 const info = this.restore_info() 133 161 if( info !== undefined && info !== null ){ 134 this.restore_info_to_globalx_with_items(info, this._items)162 need_to_save = this.restore_info_to_globalx_with_items(info, this._items) 135 163 } 136 164 else{ … … 142 170 143 171 convert_to_bookmark_mgr_from_plain_object(mgr) { 144 let new_mgr = new BookmarkMgr( mgr.max_display_name_length ) 145 146 const bk_items = mgr.items 147 bk_items.map( (bk_item) => { 148 return new_mgr.add( bk_item.path , bk_item.display_name) 149 }) 172 let new_mgr = new BookmarkMgr( mgr.max_display_name_length , mgr.parts) 173 174 const bk_items = mgr.bms 175 Object.entries( ([part, bk_items]) => { 176 new_bk_items = bk_items.map( (bk_item) => { 177 return new_mgr.add( bk_item.part , bk_item.path , bk_item.display_name) 178 } ) 179 [part, new_bk_items] 180 } ) 181 150 182 return new_mgr 151 183 } 152 184 153 185 restore_info_to_globalx_with_items(info, items){ 186 let need_to_save = true 187 154 188 this.copy_object( Globalx, info, items ) 155 156 info.parts.map( (part) => { 157 this.restore_globalx_from_info_part(info , part) 158 } ) 189 190 if( info.bookmark_mgr !== undefined ){ 191 info.bookmark_mgr = this.convert_to_bookmark_mgr_from_plain_object(info.bookmark_mgr) 192 193 if( info.parts !== undefined ){ 194 info.parts.map( (part) => { 195 this.restore_globalx_from_info_part(info , part) 196 } ) 197 need_to_save = false 198 } 199 } 200 else{ 201 Globalx.bookmark_mgr = null 202 } 203 return need_to_save 159 204 } 160 205 161 206 restore_globalx_from_info_part(info , part){ 162 info[part].bookmark_mgr = this.convert_to_bookmark_mgr_from_plain_object(info[part].bookmark_mgr)163 207 this.copy_obj_with_part(Globalx, info, part) 164 208 } … … 168 212 } 169 213 170 214 get_output_url() { 215 return this._globalStorage.output_url 216 } 171 217 172 218 reset_info = () => { … … 186 232 localStorage.clear() 187 233 } 234 188 235 show_localstorage() { 189 236 window.open('local_storage.html', '_blank') -
branches/testa-single-bookmark/tmp/script-area.txt
r28 r36 13 13 <script src="js/bookmarkmgr.js?<%= num %>"></script> 14 14 <script src="js/bookmarkmenu.js?<%= num %>"></script> 15 <script src="js/bookmarkdlg.js?<%= num %>"></script>16 15 <script src="js/tab.js?<%= num %>"></script> 17 16 <script src="js/topmenu.js?<%= num %>"></script> -
branches/testa-single-bookmark/tmp/tmp.txt
r28 r36 8 8 <link rel="stylesheet" href="./css/style.css" /> 9 9 <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'> 10 <link rel="stylesheet" href="css/style-3.css? 7">11 <link rel="stylesheet" href="css/tab.css? 7">12 <link rel="stylesheet" href="css/menu.css? 7">10 <link rel="stylesheet" href="css/style-3.css?84"> 11 <link rel="stylesheet" href="css/tab.css?84"> 12 <link rel="stylesheet" href="css/menu.css?84"> 13 13 <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" /> 14 14 <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> 15 15 <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> 16 16 <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"></script> 17 <script src="js/storagex.js?7>"></script> 18 <script src="js/sidemenu.js?7>"></script> 19 <script src="js/bookmark.js?7>"></script> 20 <script src="js/bookmarkmgr.js?7"></script> 21 <script src="js/bookmarkmenu.js?7"></script> 22 <script src="js/bookmarkdlg.js?7"></script> 23 <script src="js/tab.js?7"></script> 24 <script src="js/topmenu.js?7"></script> 25 <script src="js/remotex.js?7"></script> 26 <script src="js/main.js?7"></script> 17 <script src="js/storagex.js?84>"></script> 18 <script src="js/sidemenu.js?84>"></script> 19 <script src="js/bookmark.js?84>"></script> 20 <script src="js/bookmarkmgr.js?84"></script> 21 <script src="js/bookmarkmenu.js?84"></script> 22 <script src="js/tab.js?84"></script> 23 <script src="js/topmenu.js?84"></script> 24 <script src="js/remotex.js?84"></script> 25 <script src="js/main.js?84"></script> 27 26 28 27 <!-- AREA-END --> … … 43 42 <li><a href="#">File</a> 44 43 <ul> 45 <li><a onclick="upload_to_host('data')">Save on host</a></li>46 <li><a onclick="download_cmd('part')">Download</a></li>47 <li><a class="disabled" >-Rename</a></li>48 <li><a class="disabled" >-Move</a></li>49 <li><a class="disabled" >-Delete</a></li>50 <li><a class="disabled" >-Duplicate</a></li>51 </ul> 52 </li> 53 <li ><a href="#">Dir</a>54 <ul >55 <li ><a class="disabled" href="#">-Create</a></li>56 <li ><a class="disabled" href="#">-Rename</a></li>57 <li ><a class="disabled" href="#">-Move</a></li>58 <li ><a class="disabled" href="#">-Delete</a></li>59 <li ><a class="disabled" href="#">-Duplicate</a></li>44 <li><a id="data-file-upload" onclick="Globalx['data'].remotex.upload_to_host('data')">Save on host</a></li> 45 <li><a id="data-file-download" onclick="download_cmd('part')">Download</a></li> 46 <li><a id="data-file-rename" class="disabled" >X Rename</a></li> 47 <li><a id="data-file-move"class="disabled" >X Move</a></li> 48 <li><a id="data-file-delete"class="disabled" >X Delete</a></li> 49 <li><a id="data-file-duplicate"class="disabled" >X Duplicate</a></li> 50 </ul> 51 </li> 52 <li id="data-menu-dir" class="disabled"><a href="#">Dir</a> 53 <ul class="disabled"> 54 <li id="data-dir-create" class="disabled"><a class="disabled" href="#">X Create</a></li> 55 <li id="data-dir-rename" class="disabled"><a href="#">X Rename</a></li> 56 <li id="data-dir-move" class="disabled"><a class="disabled" href="#">X Move</a></li> 57 <li id="data-dir-delete" class="disabled"><a class="disabled" href="#">X Delete</a></li> 58 <li id="data-dir-duplicate" class="disabled"><a class="disabled" href="#">X Duplicate</a></li> 60 59 </ul> 61 60 </li> … … 66 65 <li><a href="#">Build</a> 67 66 <ul> 68 <li><a href="#">Build</a></li> 69 <li><a href="#" onclick="get_filelist()">Get FileList</a></li> 70 <li><a href="#" onclick="update_filelist()">Forced to get FileList</a></li> 71 <li><a href="#" onclick="restore_filelist(0, '/rtk/fmp_kernel')">Restore FileList</a></li> 72 </ul> 73 </li> 74 <li class="disabled"><a href="#">History</a> 75 <ul> 76 </ul> 77 67 <li><a id="data-build-build" href="#">Build</a></li> 68 <li><a id="data-build-get-filelist" href="#" onclick="get_filelist()">Get FileList</a></li> 69 <li><a id="data-build-forced-to-get-filelist" href="#" onclick="update_filelist()">Forced to get FileList</a></li> 70 <li><a id="data-build-restore-filelist" href="#" onclick="restore_filelist(0, '/rtk/fmp_kernel')">Restore FileList</a></li> 71 </ul> 72 </li> 78 73 <li><a href="#">config</a> 79 74 <ul> … … 85 80 </ul> 86 81 </li> 82 <li class="disabled"><a href="#">History</a> 83 <ul> 84 </ul> 85 87 86 </ul> 88 87 </div> … … 95 94 <input type="text" id="data-filelist_key" value="/" /> 96 95 <label id="data-bookmark_label"> 97 <!-- <input type="checkbox" id="data-bookmark_op" value="2" onclick="bookmark_op('data')"> --> 98 <input type="checkbox" id="data-bookmark_op"> 96 <input type="checkbox" id="data-bookmark_op" > 99 97 BK 100 98 </label> 101 99 <a id="data-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 100 <a id="data-down-url"></a> 101 <a id="data-partial-down-url"></a> 102 102 </div> 103 103 <div id="data-side" ></div> … … 111 111 <li><a href="#">File</a> 112 112 <ul> 113 <li><a onclick="upload_to_host('data')">Save on host</a></li>114 <li><a onclick="download_cmd('part')">Download</a></li>115 <li><a class="disabled" >-Rename</a></li>116 <li><a class="disabled" >-Move</a></li>117 <li><a class="disabled" >-Delete</a></li>118 <li><a class="disabled" >-Duplicate</a></li>119 </ul> 120 </li> 121 <li ><a href="#">Dir</a>122 <ul> 123 <li><a class="disabled" href="#">-Create</a></li>124 <li><a class="disabled" href="#">-Rename</a></li>125 <li><a class="disabled" href="#">-Move</a></li>126 <li><a class="disabled" href="#">-Delete</a></li>127 <li><a class="disabled" href="#">-Duplicate</a></li>113 <li><a id="output-file-upload" onclick="upload_to_host('data')">Save on host</a></li> 114 <li><a id="output-file-download" class="disabled" >-Download</a></li> 115 <li><a id="output-file-rename" class="disabled" >-Rename</a></li> 116 <li><a id="output-file-move" class="disabled" >-Move</a></li> 117 <li><a id="output-file-delete" class="disabled" >-Delete</a></li> 118 <li><a id="output-file-duplicate" class="disabled" >-Duplicate</a></li> 119 </ul> 120 </li> 121 <li class="disabled"><a href="#">Dir</a> 122 <ul> 123 <li><a id="output-dir-create" class="disabled" href="#">-Create</a></li> 124 <li><a id="output-dir-rename" class="disabled" href="#">-Rename</a></li> 125 <li><a id="output-dir-move" class="disabled" href="#">-Move</a></li> 126 <li><a id="output-dir-delete" class="disabled" href="#">-Delete</a></li> 127 <li><a id="output-dir-duplicate" class="disabled" href="#">-Duplicate</a></li> 128 128 </ul> 129 129 </li> … … 148 148 <input type="text" id="output-filelist_key" value="/" /> 149 149 <label id="output-bookmark_label"> 150 <!-- <input type="checkbox" id="output-bookmark_op" onclick="bookmark_op('data')"> -->151 150 <input type="checkbox" id="output-bookmark_op"> 152 151 BK 153 152 </label> 154 153 <a id="output-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 154 <a id="output-down-url"></a> 155 <a id="output-partial-down-url"></a> 155 156 156 157 </div> … … 166 167 <li><a href="#">File</a> 167 168 <ul> 168 <li><a onclick="upload_to_host('data')">Save on host</a></li>169 <li><a onclick="download_cmd('part')">Download</a></li>170 <li><a class="disabled" >-Rename</a></li>171 <li><a class="disabled" >-Move</a></li>172 <li><a class="disabled" >-Delete</a></li>173 <li><a class="disabled" >-Duplicate</a></li>174 </ul> 175 </li> 176 <li ><a href="#">Dir</a>177 <ul> 178 <li><a class="disabled" href="#">-Create</a></li>179 <li><a class="disabled" href="#">-Rename</a></li>180 <li><a class="disabled" href="#">-Move</a></li>181 <li><a class="disabled" href="#">-Delete</a></li>182 <li><a class="disabled" href="#">-Duplicate</a></li>169 <li><a id="setting-file-upload" onclick="upload_to_host('data')">Save on host</a></li> 170 <li><a id="setting-file-download" onclick="download_cmd('part')">Download</a></li> 171 <li><a id="setting-file-rename" class="disabled" >-Rename</a></li> 172 <li><a id="setting-file-move" class="disabled" >-Move</a></li> 173 <li><a id="setting-file-delete" class="disabled" >-Delete</a></li> 174 <li><a id="setting-file-duplicate" class="disabled" >-Duplicate</a></li> 175 </ul> 176 </li> 177 <li class="disabled"><a href="#">Dir</a> 178 <ul> 179 <li><a id="setting-dir-create" class="disabled" href="#">-Create</a></li> 180 <li><a id="setting-dir-rename" class="disabled" href="#">-Rename</a></li> 181 <li><a id="setting-dir-move" class="disabled" href="#">-Move</a></li> 182 <li><a id="setting-dir-delete" class="disabled" href="#">-Delete</a></li> 183 <li><a id="setting-dir-duplicate" class="disabled" href="#">-Duplicate</a></li> 183 184 </ul> 184 185 </li> 185 186 <li><a href="#">Bookmark</a> 186 <ul id=" output-bookmark">187 <ul id="setting-bookmark"> 187 188 </ul> 188 189 </li> … … 203 204 <input type="text" id="setting-filelist_key" value="/" /> 204 205 <label id="setting-bookmark_label"> 205 <!-- <input type="checkbox" id="setting-bookmark_op" onclick="bookmark_op('data')"> --> 206 <input type="checkbox" id="setting-bookmark_op"> 206 <input type="checkbox" id="setting-bookmark_op" > 207 207 BK 208 208 </label> 209 209 <a id="setting-down-download" class="xxbutton" role="button" download="some.txt" >DL</a> 210 <a id="setting-down-url"></a> 211 <a id="setting-partial-down-url"></a> 210 212 </div> 211 213 <div id="setting-side"> … … 232 234 </div> 233 235 <script> 236 main() 237 </script> 238 </body>
Note: See TracChangeset
for help on using the changeset viewer.
![(trac.ini の [header_logo] セクションを設定してください)](/python/trac/Flist/chrome/common/trac_logo_mini.png)