Changeset 1233
- Timestamp:
- 04/22/11 14:55:18 (13 years ago)
- Location:
- MDService2/trunk/MDService2/WebContent
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/WebContent/index.jsp
r1229 r1233 117 117 <!-- ------------------------------------- --> 118 118 119 119 120 120 121 <!-- QUERYLIST BLOCK --> 121 122 <div id="querylistblock" class="cmds-ui-block"> … … 161 162 <div id="terms_autocomplete"></div> 162 163 164 163 165 </body> 166 164 167 </html> -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js
r1229 r1233 502 502 }; 503 503 504 Query.prototype.updateColumns = function(slid){ 505 if (selectionlistset.getselectionlist(slid).autoSelected()){ 504 Query.prototype.updateColumns = function(selectionlist){ 505 if (selectionlist != undefined){ 506 if (selectionlist.autoSelected()){ 506 507 this.columns = ""; 507 508 } else 508 509 { 509 this.columns = selectionlistset.getselectionlist(slid).listwidget.getListText(); 510 } 511 }; 510 this.columns = selectionlist.listwidget.getListText(); 511 } 512 } 513 }; 514 512 515 Query.prototype.next = function(pages){ 513 516 var start = 0; … … 729 732 sl.listwidget.add(new ListItem($(elem).closest('.treecol').children('.column-elem').text())); 730 733 731 $(elem).data('query').updateColumns(slid);734 //$(elem).data('query').updateColumns(slid); 732 735 733 736 }; … … 770 773 } 771 774 */ 775 /* 772 776 var slid = $(this).closest('.detail-wrapper').find('.selectionlist-widget').attr("id"); 773 777 if (slid != undefined){ 774 $(this).data('query').updateColumns( slid);778 $(this).data('query').updateColumns($(this).data('detail')); 775 779 } 780 */ 781 $(this).data('query').updateColumns($(this).data('selectionlist')); 776 782 $(this).data('query').resubmit(); 777 783 }); … … 803 809 }); 804 810 //q_header.find('.cmd_add').click(function(){ 805 q_header.find('.cmd_columns').data('query', query);811 //q_header.find('.cmd_columns').data('query', query); 806 812 q_header.find('.cmd_columns').click(function(){ 807 813 query_wrapper_add_column($(this)); 808 $(this).data('query').resubmit();814 //$(this).data('query').resubmit(); 809 815 }); 810 816 q_header.find('.columns-wrapper').hide(); -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui.js
r1229 r1233 58 58 searchclauseset.addsearchclause(new SearchClause("","",""),"",0,0); 59 59 createInfos(); 60 61 detailcaller.calldetail(undefined, "info"); 60 62 61 63 }); … … 67 69 68 70 $('.cmds-ui-block').children('.header').children('.cmd_info').click(function(){ 69 var a = $(this).parent().next().attr('id'); 70 var uri = window.location.pathname + "static/info.xml"; 71 $.get(uri,{"id":a}, showDetail,'html'); 71 //var a = $(this).parent().next().attr('id'); 72 //var uri = window.location.pathname + "static/info.xml"; 73 //$.get(uri,{"id":a}, showDetail,'html'); 74 detailcaller.calldetail($(this)); 72 75 return false; 73 76 }); … … 134 137 135 138 var uri = $(this).attr('href'); // + " body"; 136 notifyUser('internal-link: ' + uri,'debug' ); 137 $.get(uri, showDetail,'html'); 139 //notifyUser('internal-link: ' + uri,'debug' ); 140 //$.get(uri, showDetail,'html'); 141 detailcaller.calldetail(undefined, "record", uri); 138 142 }); 139 143 … … 705 709 var query_elem = undefined; 706 710 var record_elem = undefined; 711 var info_elem = undefined; 707 712 708 713 $('#detailblock').children('.content').children().each(function(){ … … 718 723 if ($(this).attr("id") == "detail_record"){ 719 724 record_elem = this; 725 } 726 if ($(this).attr("id") == "detail_info"){ 727 info_elem = this; 720 728 } 721 729 }); … … 724 732 $('#detailblock').children('.content').append(elem); 725 733 } else { 726 if (did == "detail_in dex") {734 if (did == "detail_info") { 727 735 $('#detailblock').children('.content').prepend(elem); 728 736 } else { 729 if (did == "detail_ query") {730 if (in dex_elem != undefined) {731 $(in dex_elem).after(elem);737 if (did == "detail_index") { 738 if (info_elem != undefined) { 739 $(info_elem).after(elem); 732 740 } else { 733 741 if (record_elem != undefined) { … … 738 746 } 739 747 } else { 740 $('#detailblock').children('.content').append(elem); 748 if (did == "detail_query") { 749 if (index_elem != undefined) { 750 $(index_elem).after(elem); 751 } else { 752 if (record_elem != undefined) { 753 $(record_elem).before(elem); 754 } else { 755 $('#detailblock').children('.content').prepend(elem); 756 } 757 } 758 } else { 759 $('#detailblock').children('.content').append(elem); 760 } 741 761 } 742 762 } -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_detail.js
r1229 r1233 7 7 */ 8 8 9 function Detail(detailwidget, name ) {9 function Detail(detailwidget, name, url) { 10 10 this.detailwidget = detailwidget; 11 11 … … 14 14 this.content_wrapper = ''; 15 15 16 this.url = u ndefined;16 this.url = url; 17 17 this.type = undefined; 18 18 this.name = name; … … 23 23 24 24 }; 25 Detail.prototype.update = function(detailwidget ){25 Detail.prototype.update = function(detailwidget, url){ 26 26 this.detailwidget = detailwidget; 27 27 this.temp_id = ""; 28 this.url = url; 28 29 this.setData(); 29 30 … … 32 33 33 34 var widget = this.detailwidget; 34 /* 35 if ($(widget).parents('.result').length > 0){ 36 this.name = "record"; 37 } else { 38 if ($(widget).parents('.result-summary').length > 0) { 39 this.name = "values"; 40 } else { 41 if ($(widget).closest('.ui-widget').attr('name') == 'query'){ 42 this.name = 'query'; 43 } else { 44 if ($(widget).closest('.c-widget').attr('id') == 'collections-widget'){ 45 this.name = 'collections'; 46 } 47 } 48 } 49 } 50 */ 35 51 36 this.type = blocks_settings[this.name].detail.type; 52 37 switch (this.name){ … … 63 48 case 'record': 64 49 this.content = undefined; 65 this.url = $(widget).parent().find("a").attr('href'); 50 if (widget != undefined){ 51 this.url = $(widget).parent().find("a").attr('href'); 52 } 66 53 break; 67 54 case 'values': … … 75 62 this.content = undefined; 76 63 this.url = 'terms/htmldetail/?q=all'; 64 break; 65 case 'info': 66 this.content = undefined; 67 if (this.detailwidget == undefined){ 68 this.url = '/MDService2/docs/xml/welcome #welcome'; 69 } else { 70 //var a = $(this).parent().next().attr('id'); 71 this.url = window.location.pathname + "static/info.xml"; 72 } 77 73 break; 78 74 default: … … 103 99 "<a class='cmd cmd_link' target='_blank' href='" + query.link("fullpage") + "' >link</a>"; 104 100 $(this.content).find('.cmds').append($(links)); 105 //enrich selectionlist101 //enrich with selectionlist 106 102 var selectionlist = new SelectionList($(this.content).find('.columns-selected')); 107 103 selectionlistset.add(selectionlist); 104 //selectionlist.listwidget.query = query; 108 105 selectionlist.load(jsonw["WorkspaceProfile"]["CustomTermsets"]); 106 $(this.content).find('.cmd_reload').data('selectionlist',selectionlist); 109 107 if (query.columns == ""){ 110 108 var autolist = ""; … … 145 143 if (this.url != undefined){ 146 144 $(this.content_wrapper).show(); 147 $(this.content_wrapper).find('.detail-content').load(this.url,function(){ 145 $(this.content_wrapper).find('.detail-content').data('id', $(this.detailwidget).parent().next().attr('id')); 146 $(this.content_wrapper).find('.detail-content').load(this.url,function(responseText, textStatus, XMLHttpRequest){ 147 //find info data 148 if ($(this).data('id') != null){ 149 if ($(this).data('id').length > 0){ 150 $(this).html($(this).find('#' + $(this).data('id') + '-info')); 151 } 152 } 148 153 var get = $(this).parent().find('.cmd_get'); 149 154 get.removeClass('cmd_get'); … … 203 208 get.addClass('cmd_up'); 204 209 } 205 default: 210 default://pane ? 206 211 }; 207 212 … … 234 239 container: '#detaillist', 235 240 236 calldetail: function(widget ){237 var name;241 calldetail: function(widget,name, url){ 242 //var name; 238 243 var detail; 239 var content, url; 240 241 name = this.getdetailname(widget) ; 242 if (name == undefined) { 243 alert("detail name - undefined"); 244 return; 244 var content;//, url; 245 246 if (name == undefined){ 247 name = this.getdetailname(widget) ; 248 if (name == undefined) { 249 alert("detail name - undefined"); 250 return; 251 } 245 252 } 246 253 // test for values … … 255 262 if (detail == undefined) { 256 263 //content = this.getdetailcontent(name, widget); 257 detail = new Detail( widget, name 264 detail = new Detail( widget, name, url); 258 265 this.adddetail(detail); 259 266 } else { 260 267 detail.close(); 261 268 //content = this.getdetailcontent(name, widget); 262 detail.update( widget );269 detail.update( widget , url); 263 270 } 264 271 … … 303 310 if ($(widget).prev().hasClass("value-input")){ 304 311 name = 'values'; 312 } else { 313 if ($(widget).hasClass("cmd_info")){ 314 name = 'info'; 315 } 305 316 } 306 317 } … … 479 490 } 480 491 } 492 /* 493 function updateColumnsFromDetail(query){ 494 var detail = detailcaller.getdetail("detail_query"); 495 if (detail != undefined){ 496 if (query.listid == detail.temp_id){ 497 498 if (selectionlistset.getselectionlist(slid).autoSelected()){ 499 this.columns = ""; 500 } else 501 { 502 this.columns = selectionlistset.getselectionlist(slid).listwidget.getListText(); 503 } 504 } 505 } 506 } 507 */ -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_helpers.js
r1223 r1233 365 365 if (q["bookmark"] == "1") { 366 366 var uri = "/MDService2/record/htmldetail/" + q["querystring"]; 367 showDetail(null,'html'); 368 $.get(uri, showDetail,'html'); 367 detailcaller.calldetail(undefined, "record", uri); 368 //var uri = "/MDService2/record/htmldetail/" + q["querystring"]; 369 //showDetail(null,'html'); 370 //$.get(uri, showDetail,'html'); 369 371 } else { 370 372 //hideWelcomeMessage(); -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_load.js
r1229 r1233 544 544 saveWorkspace("USER"); 545 545 } 546 547 /* 548 function loadWelcomeMessage(){ 549 $('#welcomedetail').load("/MDService2/docs/xml/welcome #welcome", function() { //profile.collections.base_uri, 550 $('#welcome').addClass("ui-helper-reset ui-corner-all ui-widget-content"); 551 }); 552 } 553 */ -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_settings.js
r1219 r1233 308 308 type: "pane" 309 309 } 310 }, 311 info:{ 312 id: "#info", 313 detail: { 314 parent: "", 315 type: "pane" 316 } 310 317 } 311 318 }; -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_widgets.js
r1229 r1233 79 79 this.type = type; 80 80 81 //this.query = undefined; 81 82 //this.init(); 82 83 … … 179 180 lv.remove(colid); 180 181 //resubmit query 182 /* 181 183 if (lvid.beginsWith("sl")){ 182 184 q.query.updateColumns(sl); 183 185 q.query.resubmit(); 184 186 } 187 */ 185 188 /* 186 189 if ($(this).parent().parent().parent().attr('class') == 'query-columns'){
Note: See TracChangeset
for help on using the changeset viewer.