Commit 75acb8a3 authored by Lingnan Wu's avatar Lingnan Wu Committed by Kazuhiko Shiozaki

cleanup javascript by jslint.

parent 2f683b4e
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts50974111.7</string> </value> <value> <string>ts68192110.7</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -53,15 +53,17 @@ ...@@ -53,15 +53,17 @@
}\n }\n
\n \n
function DisplayToolBarMenu() {\n function DisplayToolBarMenu() {\n
var Z;\n
var i=0;\n
if (document.getElementById || document.all) {\n if (document.getElementById || document.all) {\n
var Z="<div style=\'text:align: center;\'><table cellpadding=\'1\' cellspacing=\'1\' style=\'border:0;margin-left:auto; margin-right:auto;\'><tr>";\n Z="<div style=\'text:align: center;\'><table cellpadding=\'1\' cellspacing=\'1\' style=\'border:0;margin-left:auto; margin-right:auto;\'><tr>";\n
for (var i=0; i<this.nb; i++) {\n for (i=0; i<this.nb; i++) {\n
Z+="<td onMouseOver=\'DisplayToolBarMenuOver(this,"+i+")\' onMouseOut=\'DisplayToolBarMenuOut(this,"+i+")\' onMouseDown=\'DisplayToolBarMenuDown(this,"+i+")\' onClick=\'DisplayToolBarMenuClick(this,"+i+")\' style=\'border-style:solid;border-width:1px;border-color:"+this.colBackground+";"+this.style+";cursor:pointer\'><img name=\'MenuToolBarIMG"+i+"\' src=\'"+this[i].imgOff+"\' border=0 width="+this.width+" height="+this.height+" align=top>&nbsp;"+this[i].text+"</TD>";\n Z+="<td onMouseOver=\'DisplayToolBarMenuOver(this,"+i+")\' onMouseOut=\'DisplayToolBarMenuOut(this,"+i+")\' onMouseDown=\'DisplayToolBarMenuDown(this,"+i+")\' onClick=\'DisplayToolBarMenuClick(this,"+i+")\' style=\'border-style:solid;border-width:1px;border-color:"+this.colBackground+";"+this.style+";cursor:pointer\'><img name=\'MenuToolBarIMG"+i+"\' src=\'"+this[i].imgOff+"\' border=0 width="+this.width+" height="+this.height+" align=top>&nbsp;"+this[i].text+"</TD>";\n
}\n }\n
Z+="</tr></table></div";\n Z+="</tr></table></div";\n
} else {\n } else {\n
var Z="| &nbsp;";\n Z="| &nbsp;";\n
for (var i=0; i<this.nb; i++) {\n for (i=0; i<this.nb; i++) {\n
Z+="<a href=\'"+this[i].url+"\' style=\'"+this.style+"\'><img name=\'MenuToolBarIMG"+i+"\' src=\\""+this[i].imgOff+"\\" border=0 width="+this.width+" height="+this.height+" align=top>&nbsp;"+this[i].text+"</a>&nbsp;|&nbsp;";\n Z+="<a href=\'"+this[i].url+"\' style=\'"+this.style+"\'><img name=\'MenuToolBarIMG"+i+"\' src=\\""+this[i].imgOff+"\\" border=0 width="+this.width+" height="+this.height+" align=top>&nbsp;"+this[i].text+"</a>&nbsp;|&nbsp;";\n
}\n }\n
}\n }\n
...@@ -123,7 +125,7 @@ ...@@ -123,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3648</int> </value> <value> <int>3668</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts45611277.21</string> </value> <value> <string>ts68192545.48</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -89,9 +89,10 @@ function Window(el) {\n ...@@ -89,9 +89,10 @@ function Window(el) {\n
\n \n
mapName = this.titleBarButtons.useMap.substr(1);\n mapName = this.titleBarButtons.useMap.substr(1);\n
mapList = document.getElementsByTagName("MAP");\n mapList = document.getElementsByTagName("MAP");\n
for (i = 0; i \074 mapList.length; i++)\n for (i = 0; i \074 mapList.length; i++){\n
if (mapList[i].name == mapName)\n if (mapList[i].name == mapName)\n
this.titleBarMap = mapList[i];\n this.titleBarMap = mapList[i];\n
}\n
\n \n
// Save colors.\n // Save colors.\n
\n \n
...@@ -134,9 +135,10 @@ function Window(el) {\n ...@@ -134,9 +135,10 @@ function Window(el) {\n
this.clientArea.parentWindow = this;\n this.clientArea.parentWindow = this;\n
this.clientArea.onclick = winClientAreaClick;\n this.clientArea.onclick = winClientAreaClick;\n
\n \n
for (i = 0; i \074 this.titleBarMap.childNodes.length; i++)\n for (i = 0; i \074 this.titleBarMap.childNodes.length; i++){\n
if (this.titleBarMap.childNodes[i].tagName == "AREA")\n if (this.titleBarMap.childNodes[i].tagName == "AREA")\n
this.titleBarMap.childNodes[i].parentWindow = this;\n this.titleBarMap.childNodes[i].parentWindow = this;\n
}\n
\n \n
// Calculate the minimum width and height values for resizing\n // Calculate the minimum width and height values for resizing\n
// and fix any initial display problems.\n // and fix any initial display problems.\n
...@@ -147,7 +149,7 @@ function Window(el) {\n ...@@ -147,7 +149,7 @@ function Window(el) {\n
// the window.\n // the window.\n
\n \n
initLt = this.frame.style.left;\n initLt = this.frame.style.left;\n
initWd = parseInt(this.frame.style.width);\n initWd = parseInt(this.frame.style.width,10);\n
this.frame.style.right = -this.titleBarText.offsetWidth + "px";\n this.frame.style.right = -this.titleBarText.offsetWidth + "px";\n
\n \n
// For IE, start calculating the value to use when setting\n // For IE, start calculating the value to use when setting\n
...@@ -323,7 +325,7 @@ function winMakeActive() {\n ...@@ -323,7 +325,7 @@ function winMakeActive() {\n
this.clientArea.style.overflow = "auto";\n this.clientArea.style.overflow = "auto";\n
if (this.inactiveButtonsImage)\n if (this.inactiveButtonsImage)\n
this.titleBarButtons.src = this.activeButtonsImage;\n this.titleBarButtons.src = this.activeButtonsImage;\n
this.frame.style.zIndex = ++winCtrl.maxzIndex;\n this.frame.style.zIndex = winCtrl.maxzIndex + 1;\n
winCtrl.active = this;\n winCtrl.active = this;\n
}\n }\n
\n \n
...@@ -459,7 +461,7 @@ function winResizeCursorSet(event) {\n ...@@ -459,7 +461,7 @@ function winResizeCursorSet(event) {\n
xOff = event.layerX;\n xOff = event.layerX;\n
yOff = event.layerY;\n yOff = event.layerY;\n
}\n }\n
winCtrl.resizeDirection = ""\n winCtrl.resizeDirection = "";\n
if (yOff \074= winCtrl.resizeCornerSize)\n if (yOff \074= winCtrl.resizeCornerSize)\n
winCtrl.resizeDirection += "n";\n winCtrl.resizeDirection += "n";\n
else if (yOff \076= this.parentWindow.frame.offsetHeight - winCtrl.resizeCornerSize)\n else if (yOff \076= this.parentWindow.frame.offsetHeight - winCtrl.resizeCornerSize)\n
...@@ -471,7 +473,7 @@ function winResizeCursorSet(event) {\n ...@@ -471,7 +473,7 @@ function winResizeCursorSet(event) {\n
\n \n
// If not on window edge, restore cursor and exit.\n // If not on window edge, restore cursor and exit.\n
\n \n
if (winCtrl.resizeDirection == "") {\n if (winCtrl.resizeDirection === "") {\n
this.onmouseout(event);\n this.onmouseout(event);\n
return;\n return;\n
}\n }\n
...@@ -668,7 +670,7 @@ function winFindByClassName(el, className) {\n ...@@ -668,7 +670,7 @@ function winFindByClassName(el, className) {\n
\n \n
for (i = 0; i \074 el.childNodes.length; i++) {\n for (i = 0; i \074 el.childNodes.length; i++) {\n
tmp = winFindByClassName(el.childNodes[i], className);\n tmp = winFindByClassName(el.childNodes[i], className);\n
if (tmp != null)\n if (tmp !== null)\n
return tmp;\n return tmp;\n
}\n }\n
\n \n
...@@ -703,9 +705,10 @@ function winInit() {\n ...@@ -703,9 +705,10 @@ function winInit() {\n
// Initialize windows and build list.\n // Initialize windows and build list.\n
\n \n
elList = document.getElementsByTagName("DIV");\n elList = document.getElementsByTagName("DIV");\n
for (var i = 0; i \074 elList.length; i++)\n for (var i = 0; i \074 elList.length; i++){\n
if (elList[i].className == "window")\n if (elList[i].className == "window")\n
winList[elList[i].id] = new Window(elList[i]);\n winList[elList[i].id] = new Window(elList[i]);\n
}\n
}\n }\n
// run initialization code after page loads.\n // run initialization code after page loads.\n
//window.onload = winInit;\n //window.onload = winInit;\n
...@@ -718,7 +721,7 @@ function winInit() {\n ...@@ -718,7 +721,7 @@ function winInit() {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>18649</int> </value> <value> <int>18672</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
671 672
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21283797.18</string> </value> <value> <string>ts67858535.25</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -65,7 +65,7 @@ function toggleHiddenFormatDialogSelection(){\n ...@@ -65,7 +65,7 @@ function toggleHiddenFormatDialogSelection(){\n
}\n }\n
\n \n
function requestPasswordReset(script_name){\n function requestPasswordReset(script_name){\n
$("#reference").attr("value", $("#__ac_name").val()) \n $("#reference").attr("value", $("#__ac_name").val());\n
// reset __ac_name & __ac_password in case they have been filled by browser\n // reset __ac_name & __ac_password in case they have been filled by browser\n
$("#__ac_name").attr("value", "");\n $("#__ac_name").attr("value", "");\n
$("#__ac_password").attr("value", "");\n $("#__ac_password").attr("value", "");\n
...@@ -73,7 +73,7 @@ function requestPasswordReset(script_name){\n ...@@ -73,7 +73,7 @@ function requestPasswordReset(script_name){\n
main_form = $("#main_form");\n main_form = $("#main_form");\n
main_form.attr("action", script_name);\n main_form.attr("action", script_name);\n
main_form.submit();\n main_form.submit();\n
};\n }\n
\n \n
//enable or disable right side search result preview\n //enable or disable right side search result preview\n
var show_preview=false;\n var show_preview=false;\n
...@@ -84,7 +84,7 @@ function togglePreview(dom_id,path){\n ...@@ -84,7 +84,7 @@ function togglePreview(dom_id,path){\n
/* \n /* \n
Enable or disable right preview in search mode listbox style. \n Enable or disable right preview in search mode listbox style. \n
*/\n */\n
listbox_container = $("#"+dom_id).parents("div.listbox-container")\n listbox_container = $("#"+dom_id).parents("div.listbox-container");\n
if(!$("#listbox-preview").length){\n if(!$("#listbox-preview").length){\n
// init only once per listbox\n // init only once per listbox\n
listbox_container.append(\'<div id="listbox-preview"><img src="ajax-loader.gif" title="Loading" alt="Loading" /><p>Loading...</p> </div>\');\n listbox_container.append(\'<div id="listbox-preview"><img src="ajax-loader.gif" title="Loading" alt="Loading" /><p>Loading...</p> </div>\');\n
...@@ -103,13 +103,13 @@ function formatPreview(dom_id, path){\n ...@@ -103,13 +103,13 @@ function formatPreview(dom_id, path){\n
*/\n */\n
popup = $("#listbox-preview");\n popup = $("#listbox-preview");\n
dom_object = $("#"+dom_id);\n dom_object = $("#"+dom_id);\n
parent_row = dom_object.parents("tr").first()\n parent_row = dom_object.parents("tr").first();\n
row_object = dom_object.parents("tr").first();\n row_object = dom_object.parents("tr").first();\n
class_name = row_object.attr("class"); \n class_name = row_object.attr("class"); \n
class_name = class_name.replace("listbox-data-line-","");\n class_name = class_name.replace("listbox-data-line-","");\n
class_name = class_name.replace("DataA","");\n class_name = class_name.replace("DataA","");\n
class_name = class_name.replace("DataB","");\n class_name = class_name.replace("DataB","");\n
row_index = parseInt(class_name);\n row_index = parseInt(class_name, 10);\n
//calculate current row offset relative to listbox\'s table.tbody\n //calculate current row offset relative to listbox\'s table.tbody\n
offset = parent_row.position("tbody").top - $("tr.listbox-data-line-0").position("tbody").top;\n offset = parent_row.position("tbody").top - $("tr.listbox-data-line-0").position("tbody").top;\n
popup.css("top", offset + "px");\n popup.css("top", offset + "px");\n
...@@ -142,7 +142,7 @@ function showPopik(dom_id, path){\n ...@@ -142,7 +142,7 @@ function showPopik(dom_id, path){\n
popup_html = $("#hidden_popup_listbox_"+dom_id).html();\n popup_html = $("#hidden_popup_listbox_"+dom_id).html();\n
popup.html(popup_html);\n popup.html(popup_html);\n
popup.show();\n popup.show();\n
return\n return;\n
}\n }\n
// we must request popup info with another request\n // we must request popup info with another request\n
popup_html = popup_local_dict[dom_id];\n popup_html = popup_local_dict[dom_id];\n
...@@ -170,7 +170,7 @@ function initialize_form(){\n ...@@ -170,7 +170,7 @@ function initialize_form(){\n
$(\'input\').keypress(function(e) {\n $(\'input\').keypress(function(e) {\n
if(e.which == 10 || e.which == 13) {$("#input-save-edit").click();}\n if(e.which == 10 || e.which == 13) {$("#input-save-edit").click();}\n
});\n });\n
})\n });\n
}\n }\n
}\n }\n
\n \n
...@@ -224,10 +224,10 @@ function initialize_form(){\n ...@@ -224,10 +224,10 @@ function initialize_form(){\n
// if(pdf_preview_navigation.length){\n // if(pdf_preview_navigation.length){\n
// \n // \n
// // XXX: set hooks\n // // XXX: set hooks\n
// $("div.pdf-preview-navigation a img.first").parent("a").click(loadThumbnail);\n // // $("div.pdf-preview-navigation a img.first").parent("a").click(loadThumbnail);\n
// $("div.pdf-preview-navigation a img.previous").parent("a").click(loadThumbnail);\n // // $("div.pdf-preview-navigation a img.previous").parent("a").click(loadThumbnail);\n
// $("div.pdf-preview-navigation a img.next").parent("a").click(loadThumbnail);\n // // $("div.pdf-preview-navigation a img.next").parent("a").click(loadThumbnail);\n
// $("div.pdf-preview-navigation a img.last").parent("a").click(loadThumbnail); \n // // $("div.pdf-preview-navigation a img.last").parent("a").click(loadThumbnail); \n
// \n // \n
// }\n // }\n
// }\n // }\n
...@@ -248,19 +248,19 @@ function highlight_search_word(){\n ...@@ -248,19 +248,19 @@ function highlight_search_word(){\n
/*\n /*\n
Use referer to get search text (if coming from GET search page) and highlight found words.\n Use referer to get search text (if coming from GET search page) and highlight found words.\n
*/\n */\n
query_array = queryStringToArray(document.referrer)\n query_array = queryStringToArray(document.referrer);\n
search_text = query_array["search_text"]\n search_text = query_array["search_text"];\n
if (search_text!=undefined){\n if (search_text!=undefined){\n
document_body = $("#main_content div.document div.page")\n document_body = $("#main_content div.document div.page");\n
headline = $("#main_content div.document span.headline")\n headline = $("#main_content div.document span.headline");\n
title = $("#wrapper_headline div.header_title")\n title = $("#wrapper_headline div.header_title");\n
// multiple words\n // multiple words\n
search_word_list = search_text.split("%20")\n search_word_list = search_text.split("%20");\n
for(var i=0; i<search_word_list.length; i++) {\n for(var i=0; i<search_word_list.length; i++) {\n
if (search_word_list[i] != \'\') {\n if (search_word_list[i] !== \'\') {\n
document_body.highlight(search_word_list[i], "highlight")\n document_body.highlight(search_word_list[i], "highlight");\n
headline.highlight(search_word_list[i], "highlight")\n headline.highlight(search_word_list[i], "highlight");\n
title.highlight(search_word_list[i], "highlight")\n title.highlight(search_word_list[i], "highlight");\n
}\n }\n
\n \n
}\n }\n
...@@ -279,7 +279,7 @@ $(document).ready(initialize_form);\n ...@@ -279,7 +279,7 @@ $(document).ready(initialize_form);\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>8419</int> </value> <value> <int>8444</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
1875 1876
\ No newline at end of file \ No newline at end of file
761 762
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts06480713.25</string> </value> <value> <string>ts68194304.12</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -56,7 +56,7 @@ function setCreationMode (sel) {\n ...@@ -56,7 +56,7 @@ function setCreationMode (sel) {\n
// a portal type is given, so create a new document\n // a portal type is given, so create a new document\n
var portal_type = sel.options[sel.selectedIndex].value;\n var portal_type = sel.options[sel.selectedIndex].value;\n
if (portal_type != \'None\') {\n if (portal_type != \'None\') {\n
action = \'new\'\n action = \'new\';\n
action_name = \'Create New &amp; Edit\';\n action_name = \'Create New &amp; Edit\';\n
icon = \'admin_toolbox_new_document.png\';\n icon = \'admin_toolbox_new_document.png\';\n
name = \'Base_newContent:method\';\n name = \'Base_newContent:method\';\n
...@@ -93,8 +93,8 @@ function initialize_toolbar(){\n ...@@ -93,8 +93,8 @@ function initialize_toolbar(){\n
menu = $(this);\n menu = $(this);\n
var menu_title = menu.children("h3.menu_title").first();\n var menu_title = menu.children("h3.menu_title").first();\n
var item = menu.children("div.menu").first();\n var item = menu.children("div.menu").first();\n
menu_title.bind("click", function (){display_menu(item)} );\n menu_title.bind("click", function (){display_menu(item);} );\n
})}\n });}\n
\n \n
function display_menu(clicked_item){\n function display_menu(clicked_item){\n
/* when called funtion will display current menu and hide rest */\n /* when called funtion will display current menu and hide rest */\n
...@@ -104,7 +104,7 @@ function display_menu(clicked_item){\n ...@@ -104,7 +104,7 @@ function display_menu(clicked_item){\n
menu = $(this);\n menu = $(this);\n
var item = menu.children("div.menu").first();\n var item = menu.children("div.menu").first();\n
if (item.parent().attr("id") != clicked_item.parent().attr("id")) {item.hide();}\n if (item.parent().attr("id") != clicked_item.parent().attr("id")) {item.hide();}\n
})};\n });}\n
\n \n
$(document).ready(initialize_toolbar);\n $(document).ready(initialize_toolbar);\n
...@@ -117,7 +117,7 @@ $(document).ready(initialize_toolbar);\n ...@@ -117,7 +117,7 @@ $(document).ready(initialize_toolbar);\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2925</int> </value> <value> <int>2928</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
1099 1100
\ No newline at end of file \ No newline at end of file
...@@ -44,6 +44,7 @@ function callBeforeRequest(type){\n ...@@ -44,6 +44,7 @@ function callBeforeRequest(type){\n
case 4:\n case 4:\n
message = "The request is being processed ...";\n message = "The request is being processed ...";\n
break;\n break;\n
default: break;\n
}\n }\n
$("#errorpannel").hide();\n $("#errorpannel").hide();\n
$("#loadingpannel").html(message).show();\n $("#loadingpannel").html(message).show();\n
...@@ -89,14 +90,14 @@ function Edit(data){\n ...@@ -89,14 +90,14 @@ function Edit(data){\n
{name : \'title\', \'value\': dataHash.title},\n {name : \'title\', \'value\': dataHash.title},\n
{name : \'request_type\', \'value\': \'update\'},\n {name : \'request_type\', \'value\': \'update\'},\n
{name : \'event_id\', \'value\': $("input#event_id").attr("value")},\n {name : \'event_id\', \'value\': $("input#event_id").attr("value")},\n
{name : \'event_text_content\', \'value\': dataHash.event_text_content}]\n {name : \'event_text_content\', \'value\': dataHash.event_text_content}];\n
\n \n
$.post("Base_updateCalendarEventList", paramList, function(){\n $.post("Base_updateCalendarEventList", paramList, function(){\n
$("div#new_event_dialog").dialog("close");\n $("div#new_event_dialog").dialog("close");\n
$("div#showreflashbtn.fbutton").click();\n $("div#showreflashbtn.fbutton").click();\n
});\n });\n
},\n }\n
},\n }\n
});\n });\n
$("div#new_event_dialog").load(url, {}, function(){\n $("div#new_event_dialog").load(url, {}, function(){\n
$("form#create_new_event").append("<input type=\'hidden\' id=\'event_id\'/>");\n $("form#create_new_event").append("<input type=\'hidden\' id=\'event_id\'/>");\n
...@@ -105,13 +106,13 @@ function Edit(data){\n ...@@ -105,13 +106,13 @@ function Edit(data){\n
$("textarea[name=\'event_text_content\']").val(data[11]);\n $("textarea[name=\'event_text_content\']").val(data[11]);\n
$("input[name=\'title\']").attr("value", data[1]);\n $("input[name=\'title\']").attr("value", data[1]);\n
$("input.start_date_field[name=\'start_date_year\']").attr("value", data[2].getFullYear());\n $("input.start_date_field[name=\'start_date_year\']").attr("value", data[2].getFullYear());\n
$("input.start_date_field[name=\'start_date_month\']").attr("value", (parseInt(data[2].getMonth()) + 1));\n $("input.start_date_field[name=\'start_date_month\']").attr("value", (parseInt(data[2].getMonth(),10) + 1));\n
$("input.start_date_field[name=\'start_date_day\']").attr("value", data[2].getDate());\n $("input.start_date_field[name=\'start_date_day\']").attr("value", data[2].getDate());\n
$("input.start_date_field[name=\'start_date_hour\']").attr("value", data[2].getHours());\n $("input.start_date_field[name=\'start_date_hour\']").attr("value", data[2].getHours());\n
$("input.start_date_field[name=\'start_date_minute\']").attr("value", data[2].getMinutes());\n $("input.start_date_field[name=\'start_date_minute\']").attr("value", data[2].getMinutes());\n
\n \n
$("input.stop_date_field[name=\'stop_date_year\']").attr("value", data[3].getFullYear());\n $("input.stop_date_field[name=\'stop_date_year\']").attr("value", data[3].getFullYear());\n
$("input.stop_date_field[name=\'stop_date_month\']").attr("value", (parseInt(data[3].getMonth()) + 1));\n $("input.stop_date_field[name=\'stop_date_month\']").attr("value", (parseInt(data[3].getMonth(),10) + 1));\n
$("input.stop_date_field[name=\'stop_date_day\']").attr("value", data[3].getDate());\n $("input.stop_date_field[name=\'stop_date_day\']").attr("value", data[3].getDate());\n
$("input.stop_date_field[name=\'stop_date_hour\']").attr("value", data[3].getHours());\n $("input.stop_date_field[name=\'stop_date_hour\']").attr("value", data[3].getHours());\n
$("input.stop_date_field[name=\'stop_date_minute\']").attr("value", data[3].getMinutes());\n $("input.stop_date_field[name=\'stop_date_minute\']").attr("value", data[3].getMinutes());\n
...@@ -165,7 +166,7 @@ function createFieldToInsertOnDialog(){\n ...@@ -165,7 +166,7 @@ function createFieldToInsertOnDialog(){\n
"<option>Site Message</option>" + \n "<option>Site Message</option>" + \n
"<option>Visit</option>" +\n "<option>Visit</option>" +\n
"<option>Web Message</option>" +\n "<option>Web Message</option>" +\n
"</select></td>"\n "</select></td>";\n
}\n }\n
\n \n
i18n.xgcalendar.content = "Title";\n i18n.xgcalendar.content = "Title";\n
...@@ -191,7 +192,7 @@ $(document).ready(function() { \n ...@@ -191,7 +192,7 @@ $(document).ready(function() { \n
quickAddUrl: DATA_FEED_URL + "?request_type=add",\n quickAddUrl: DATA_FEED_URL + "?request_type=add",\n
quickUpdateUrl: DATA_FEED_URL + "?request_type=update",\n quickUpdateUrl: DATA_FEED_URL + "?request_type=update",\n
quickDeleteUrl: DATA_FEED_URL + "?request_type=remove",\n quickDeleteUrl: DATA_FEED_URL + "?request_type=remove",\n
loadFieldOnDialog: createFieldToInsertOnDialog, \n loadFieldOnDialog: createFieldToInsertOnDialog \n
};\n };\n
var $dv = $("#calhead");\n var $dv = $("#calhead");\n
var _MH = document.documentElement.clientHeight;\n var _MH = document.documentElement.clientHeight;\n
...@@ -205,7 +206,7 @@ $(document).ready(function() { \n ...@@ -205,7 +206,7 @@ $(document).ready(function() { \n
$("div.toolbar-listview, div.event-listview").remove();\n $("div.toolbar-listview, div.event-listview").remove();\n
$("#caltoolbar div.fcurrent").each(function() {\n $("#caltoolbar div.fcurrent").each(function() {\n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n });\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var optionList = $("#gridcontainer").swtichView("day").BcalGetOp();\n var optionList = $("#gridcontainer").swtichView("day").BcalGetOp();\n
$("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n $("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n
...@@ -215,7 +216,7 @@ $(document).ready(function() { \n ...@@ -215,7 +216,7 @@ $(document).ready(function() { \n
$("div.toolbar-listview, div.event-listview").remove();\n $("div.toolbar-listview, div.event-listview").remove();\n
$("#caltoolbar div.fcurrent").each(function() {\n $("#caltoolbar div.fcurrent").each(function() {\n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n });\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var optionList = $("#gridcontainer").swtichView("week").BcalGetOp();\n var optionList = $("#gridcontainer").swtichView("week").BcalGetOp();\n
$("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n $("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n
...@@ -225,7 +226,7 @@ $(document).ready(function() { \n ...@@ -225,7 +226,7 @@ $(document).ready(function() { \n
$("div.toolbar-listview, div.event-listview").remove();\n $("div.toolbar-listview, div.event-listview").remove();\n
$("#caltoolbar div.fcurrent").each(function() {\n $("#caltoolbar div.fcurrent").each(function() {\n
$(this).removeClass("fcurrent");\n $(this).removeClass("fcurrent");\n
})\n });\n
$(this).addClass("fcurrent");\n $(this).addClass("fcurrent");\n
var optionList = $("#gridcontainer").swtichView("month").BcalGetOp();\n var optionList = $("#gridcontainer").swtichView("month").BcalGetOp();\n
$("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n $("div#display-datetime span#text-datetime").text(optionList.datestrshow);\n
...@@ -264,7 +265,7 @@ $(document).ready(function() { \n ...@@ -264,7 +265,7 @@ $(document).ready(function() { \n
autoOpen: false,\n autoOpen: false,\n
height: 248,\n height: 248,\n
width: 410,\n width: 410,\n
modal: true,\n modal: true\n
});\n });\n
$("#datepicker").datepicker({\n $("#datepicker").datepicker({\n
onSelect: function(dateText, inst){\n onSelect: function(dateText, inst){\n
...@@ -278,12 +279,12 @@ $(document).ready(function() { \n ...@@ -278,12 +279,12 @@ $(document).ready(function() { \n
});\n });\n
$("input#submit-search").click(function(event){\n $("input#submit-search").click(function(event){\n
event.preventDefault();\n event.preventDefault();\n
if ($("input[name=\'searchable-text\']").val() == "")\n if ($("input[name=\'searchable-text\']").val() === "")\n
return false;\n return false;\n
$("div#dvCalMain.calmain div#gridcontainer").css("background", "none repeat scroll 0 0 #FFFFFF");\n $("div#dvCalMain.calmain div#gridcontainer").css("background", "none repeat scroll 0 0 #FFFFFF");\n
$("div#dvwkcontaienr.wktopcontainer").remove();\n $("div#dvwkcontaienr.wktopcontainer").remove();\n
$("div#gridcontainer div#dvtec.scolltimeevent").remove();\n $("div#gridcontainer div#dvtec.scolltimeevent").remove();\n
if (document.getElementById("blank-result") != null){\n if (document.getElementById("blank-result") !== null){\n
$("div#blank-result").remove();\n $("div#blank-result").remove();\n
}\n }\n
$("div#gridcontainer div.event-listview,div#gridcontainer div.toolbar-listview").remove();\n $("div#gridcontainer div.event-listview,div#gridcontainer div.toolbar-listview").remove();\n
...@@ -299,7 +300,7 @@ $(document).ready(function() { \n ...@@ -299,7 +300,7 @@ $(document).ready(function() { \n
tableList.push("<table width=\'100%\' cellspacing=\'0\' cellpadding=\'2\'><tbody>");\n tableList.push("<table width=\'100%\' cellspacing=\'0\' cellpadding=\'2\'><tbody>");\n
text = $("input[name=\'searchable-text\']").val();\n text = $("input[name=\'searchable-text\']").val();\n
paramList = [{name: "request_type", value: "list"}];\n paramList = [{name: "request_type", value: "list"}];\n
if (text != "")\n if (text !== "")\n
paramList.push({name: "SearchableText", value: text});\n paramList.push({name: "SearchableText", value: text});\n
$.ajax({\n $.ajax({\n
url:"Base_updateCalendarEventList",\n url:"Base_updateCalendarEventList",\n
...@@ -341,17 +342,16 @@ $(document).ready(function() { \n ...@@ -341,17 +342,16 @@ $(document).ready(function() { \n
$("#gridcontainer").bcalendar(op).BcalGetOp();\n $("#gridcontainer").bcalendar(op).BcalGetOp();\n
});\n });\n
if ($("div.event-listview tr").height() > 0){\n if ($("div.event-listview tr").height() > 0){\n
$("div#gridcontainer").css("height", \n $("div#gridcontainer").css("height",\n
$("div#gridcontainer table tbody tr").length*$("div.event-listview tr").height() + "px");\n $("div#gridcontainer table tbody tr").length*$("div.event-listview tr").height() + "px");\n
} else {\n } else {\n
$("div#gridcontainer")\n $("div#gridcontainer").css("height", "54px").append("<div id=\'blank-result\'>No Results</div>");\n
.css("height", "54px")\n }\n
.append("<div id=\'blank-result\'>No Results</div>");\n
}\n }\n
},\n
});\n });\n
tableList.push("</tbody></table></div>");\n tableList.push("</tbody></table></div>");\n
$("div#gridcontainer").append(tableList.join(""));\n $("div#gridcontainer").append(tableList.join(""));\n
return true;\n
});\n });\n
$("img[alt=\'calendar_logo_box\']").click(function(){\n $("img[alt=\'calendar_logo_box\']").click(function(){\n
window.location.reload();\n window.location.reload();\n
...@@ -363,14 +363,14 @@ $("div#new_event_dialog").ready(function(){\n ...@@ -363,14 +363,14 @@ $("div#new_event_dialog").ready(function(){\n
title: "Create New Event",\n title: "Create New Event",\n
autoOpen: false,\n autoOpen: false,\n
buttons: {\n buttons: {\n
"Create": createNewEvent,\n "Create": createNewEvent\n
},\n }\n
});\n });\n
});\n });\n
\n \n
window.onload = function(){\n window.onload = function(){\n
$("div#dvCalMain.calmain").parent().css("padding", "0 0 0 1px");\n $("div#dvCalMain.calmain").parent().css("padding", "0 0 0 1px");\n
} };
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -102,7 +102,7 @@ $().ready(function(){\n ...@@ -102,7 +102,7 @@ $().ready(function(){\n
data: emailUid,\n data: emailUid,\n
mediaType: "json",\n mediaType: "json",\n
success: function(data){\n success: function(data){\n
var data = jQuery.parseJSON(data);\n data = jQuery.parseJSON(data);\n
$("div.main-right fieldset.widget").hide();\n $("div.main-right fieldset.widget").hide();\n
$("div.main-right").css("background-color", "#BBCCFF");\n $("div.main-right").css("background-color", "#BBCCFF");\n
$("div.main-right").load("EmailThread_formView", {}, function(){\n $("div.main-right").load("EmailThread_formView", {}, function(){\n
...@@ -111,12 +111,12 @@ $().ready(function(){\n ...@@ -111,12 +111,12 @@ $().ready(function(){\n
}\n }\n
$("button#save-mail, button#send-mail").click(saveEmailThread);\n $("button#save-mail, button#send-mail").click(saveEmailThread);\n
$(this).ready(function(){\n $(this).ready(function(){\n
(data.cc != null) ? $("textarea#cc").attr("value", data.cc) : null;\n (data.cc !== null) ? $("textarea#cc").attr("value", data.cc) : null;\n
(data.bcc != null) ? $("textarea#bcc").attr("value", data.bcc) : null;\n (data.bcc !== null) ? $("textarea#bcc").attr("value", data.bcc) : null;\n
(data.to != null) ? $("textarea#to").attr("value", data.to) : null;\n (data.to !== null) ? $("textarea#to").attr("value", data.to) : null;\n
(data.text_content != null) ? $("textarea#text-content").attr("value", data.text_content) : null;\n (data.text_content !== null) ? $("textarea#text-content").attr("value", data.text_content) : null;\n
(data.subject != null) ? $("input#subject").attr("value", data.subject) : null;\n (data.subject !== null) ? $("input#subject").attr("value", data.subject) : null;\n
(data.id != null) ? $("div.compose-mail-page").data("event_id", data.id) : null;\n (data.id !== null) ? $("div.compose-mail-page").data("event_id", data.id) : null;\n
loadEmailFormActions();\n loadEmailFormActions();\n
});\n });\n
});\n });\n
......
411 412
\ No newline at end of file \ No newline at end of file
...@@ -280,6 +280,7 @@ var addOnChangeEventHandler = function() {\n ...@@ -280,6 +280,7 @@ var addOnChangeEventHandler = function() {\n
this.onchange = function() { changed = true; };\n this.onchange = function() { changed = true; };\n
}\n }\n
});\n });\n
return true;\n
});\n });\n
}\n }\n
});\n });\n
...@@ -316,6 +317,7 @@ var rewriteIndentedSelect = function() {\n ...@@ -316,6 +317,7 @@ var rewriteIndentedSelect = function() {\n
$(this).html(text.replace(/^(&nbsp;)+/, ""));\n $(this).html(text.replace(/^(&nbsp;)+/, ""));\n
$(this).css("paddingLeft", level+"em");\n $(this).css("paddingLeft", level+"em");\n
}\n }\n
return true;
});\n });\n
});\n });\n
};\n };\n
......
...@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
function setFocus() {\n function setFocus() {\n
login = document.getElementById(\'name\');\n login = document.getElementById(\'name\');\n
password = document.getElementById(\'password\');\n password = document.getElementById(\'password\');\n
if (login.value != \'\')\n if (login.value !== \'\')\n
password.focus();\n password.focus();\n
else\n else\n
login.focus();\n login.focus();\n
......
1097 1098
\ 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