Commit 0c18f999 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Refactor to only load UNG document list when necessary

Only loads UNG document list when on UNG main page.
parent 1ae31dc1
...@@ -620,36 +620,37 @@ $().ready(function(){\n ...@@ -620,36 +620,37 @@ $().ready(function(){\n
h3Tag.hide();\n h3Tag.hide();\n
}\n }\n
\n \n
// render main document listbox\n if (!$("div.gadget-column").length == 0) {\n
$.ajax({\n // render main document listbox\n
async: false,\n $.ajax({\n
url: \'WebSection_getUNGDocumentListPadAsJSON\',\n async: false,\n
data: {pad_relative_url: \'knowledge_pad_module/ung_knowledge_pad\', mode: \'web_front\'},\n url: \'WebSection_getUNGDocumentListPadAsJSON\',\n
dataType: \'json\',\n data: {pad_relative_url: \'knowledge_pad_module/ung_knowledge_pad\', mode: \'web_front\'},\n
success: function(data){\n dataType: \'json\',\n
external_data = data\n success: function(data){\n
var data_html = $(data.body)[0]\n external_data = data\n
//var data_script = $(data.body)[1].text\n var data_html = $(data.body)[0]\n
var data_script = data.javascript\n //var data_script = $(data.body)[1].text\n
\n var data_script = data.javascript\n
ung_listbox_container = $(\'div#main_listbox-container\')\n \n
// fill body\n ung_listbox_container = $(\'div#main_listbox-container\')\n
ung_listbox_container.html(data_html);\n // fill body\n
// attach listener\n ung_listbox_container.html(data_html);\n
ung_listbox_container.live(\'DOMSubtreeModified\', checkUNGListbox)\n // attach listener\n
// eval script\n ung_listbox_container.live(\'DOMSubtreeModified\', checkUNGListbox)\n
eval(data_script)\n // eval script\n
// remove class \'portal-column\' from main listbox\n eval(data_script)\n
// (as it should not interfere in user\'s box layout)\n // remove class \'portal-column\' from main listbox\n
// updateServerBoxColumnLayout method uses \'div.portal-column\' as selector\n // (as it should not interfere in user\'s box layout)\n
ung_listbox_container.find(\'div.portal-column\')[0].className = \'\'\n // updateServerBoxColumnLayout method uses \'div.portal-column\' as selector\n
\n ung_listbox_container.find(\'div.portal-column\')[0].className = \'\'\n
configureUNGSearch(data_script);\n \n
\n configureUNGSearch(data_script);\n
wrapUpdater();\n \n
}\n wrapUpdater();\n
});\n }\n
\n });\n
}\n
return false;\n return false;\n
});\n });\n
\n \n
......
2011-07-01 gabriel.oliveira
* Refactor to only load UNG document list when necessary
2011-07-01 gabriel.oliveira 2011-07-01 gabriel.oliveira
* Remove old way of overriding preference for text editors * Remove old way of overriding preference for text editors
......
385 386
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment