Author: degenaro Date: Mon Oct 21 23:16:25 2013 New Revision: 1534412 URL: http://svn.apache.org/r1534412 Log: UIMA-3362 DUCC webserver (WS) default to "classic" view
Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-scroll.jsp Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/preferences.jsp Added: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-scroll.jsp URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24imports-scroll.jsp?rev=1534412&view=auto ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-scroll.jsp (added) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports-scroll.jsp Mon Oct 21 23:16:25 2013 @@ -0,0 +1,65 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<% +String table_style = "scroll"; +String cookieName = "ducc:table_style"; +String cookieValue = null; +Cookie cookie = null; +Cookie cookies [] = request.getCookies (); +if (cookies != null) +{ + for (int i = 0; i < cookies.length; i++) + { + if (cookies [i].getName().equals (cookieName)) + { + cookie = cookies[i]; + cookieValue = cookie.getValue(); + if(cookieValue != null) { + table_style = cookieValue; + } + break; + } + } +} +%> + <script src="opensources/jquery-1.4.2.js" type="text/javascript"></script> + <script src="opensources/cluetip/jquery.cluetip.js" type="text/javascript"></script> + <link href="opensources/cluetip/jquery.cluetip.css" rel="stylesheet" type="text/css"> +<% +if (table_style.equals("scroll")) { +%> + <script type="text/javascript" language="javascript" src="opensources/DataTables-1.9.1/media/js/jquery.dataTables.min.js"></script> + <script type="text/javascript" language="javascript" src="opensources/DataTables-plugins/fnReloadAjax.js"></script> +<% +} +%> +<% +if (table_style.equals("classic")) { +%> + <script type="text/javascript" src="opensources/sorttable.js"></script> +<% +} +%> + <script src="opensources/jgrowl/jquery.jgrowl.js" type="text/javascript"></script> + <link rel="stylesheet" href="opensources/jgrowl/jquery.jgrowl.css" type="text/css"/> + <link href="opensources/jquery-ui-1.8.4/gallery/jquery-ui-themes-1.8.4/themes/redmond/jquery-ui.css" rel="stylesheet" type="text/css"/> + <script src="opensources/jquery-ui-1.8.4/ui/minified/jquery-ui.min.js"></script> + <link href="opensources/navigation/menu.css" rel="stylesheet" type="text/css"> + <script src="js/ducc.js"></script> + <link href="ducc.css" rel="stylesheet" type="text/css"> Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24imports.jsp?rev=1534412&r1=1534411&r2=1534412&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$imports.jsp Mon Oct 21 23:16:25 2013 @@ -17,7 +17,7 @@ specific language governing permissions under the License. --> <% -String table_style = "scroll"; +String table_style = "classic"; String cookieName = "ducc:table_style"; String cookieValue = null; Cookie cookie = null; Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js?rev=1534412&r1=1534411&r2=1534412&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js Mon Oct 21 23:16:25 2013 @@ -284,11 +284,11 @@ function ducc_load_jobs_data() } ms_load_jobs_data = ms_now; var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_jobs_data() + if(table_style == "scroll") { + ducc_load_scroll_jobs_data() } else { - ducc_load_scroll_jobs_data() + ducc_load_classic_jobs_data() } } @@ -367,11 +367,11 @@ function ducc_load_services_data() } ms_load_services_data = ms_now; var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_services_data() + if(table_style == "scroll") { + ducc_load_scroll_services_data() } else { - ducc_load_scroll_services_data() + ducc_load_classic_services_data() } } @@ -1085,11 +1085,11 @@ function ducc_load_machines_data() } ms_load_system_machines_data = ms_now; var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_machines_data() + if(table_style == "scroll") { + ducc_load_scroll_machines_data() } else { - ducc_load_scroll_machines_data() + ducc_load_classic_machines_data() } } @@ -1185,11 +1185,11 @@ function ducc_load_reservations_data() ms_load_reservations_data = ms_now; ducc_reservation_form_button(); var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_reservations_data() + if(table_style == "scroll") { + ducc_load_scroll_reservations_data() } else { - ducc_load_scroll_reservations_data() + ducc_load_classic_reservations_data() } } @@ -1459,11 +1459,11 @@ function ducc_init_system_administration function ducc_load_system_classes_data() { var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_system_classes_data() + if(table_style == "scroll") { + ducc_load_scroll_system_classes_data() } else { - ducc_load_scroll_system_classes_data() + ducc_load_classic_system_classes_data() } } @@ -1606,11 +1606,11 @@ function ducc_load_system_daemons_data() } ms_load_system_daemons_data = ms_now; var table_style = ducc_preferences_get("table_style"); - if(table_style == "classic") { - ducc_load_classic_system_daemons_data() + if(table_style == "scroll") { + ducc_load_scroll_system_daemons_data() } else { - ducc_load_scroll_system_daemons_data() + ducc_load_classic_system_daemons_data() } ducc_default_agents(); } @@ -2768,7 +2768,7 @@ function ducc_preferences_reset() { try { var key = ducc_appl("table_style"); - var value = "scroll"; + var value = "classic"; //alert("ducc_preferences_reset"+" "+"key:"+key+" "+"value:"+value); ducc_put_cookie(key,value); var key = ducc_appl("date_style"); @@ -2831,16 +2831,16 @@ function ducc_preferences_table_style() var key = ducc_appl("table_style"); var value = ducc_get_cookie(key); //alert("ducc_preferences"+" "+"key:"+key+" "+"value:"+value); - if(value == "scroll") { + if(value == "classic") { document.form_preferences.table_style[0].checked = true; document.form_preferences.table_style[1].checked = false; } - else if(value == "classic") { + else if(value == "scroll") { document.form_preferences.table_style[0].checked = false; document.form_preferences.table_style[1].checked = true; } else { - value = "scroll"; + value = "classic"; ducc_put_cookie(key, value); document.form_preferences.table_style[0].checked = true; document.form_preferences.table_style[1].checked = false; Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/preferences.jsp URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/preferences.jsp?rev=1534412&r1=1534411&r2=1534412&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/preferences.jsp (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/preferences.jsp Mon Oct 21 23:16:25 2013 @@ -119,9 +119,9 @@ boolean role = true; <tr> <td><i><b>Table Style</b></i> <td>  - <td><input type="radio" name="table_style" value="scroll" checked onclick="ducc_preferences_set('table_style','scroll')" /> Scroll + <td><input type="radio" name="table_style" value="classic" checked onclick="ducc_preferences_set('table_style','classic')" /> Classic <td>  - <td><input type="radio" name="table_style" value="classic" onclick="ducc_preferences_set('table_style','classic')" /> Classic + <td><input type="radio" name="table_style" value="scroll" onclick="ducc_preferences_set('table_style','scroll')" /> Scroll <td>  <td>  <%