[geeklog-cvs] Geeklog-1.x/public_html/layout/professional/admin/config configuration.thtml, 1.3, 1.4

Blaine Lang blaine at qs1489.pair.com
Sat Dec 1 16:20:14 EST 2007


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/layout/professional/admin/config
In directory qs1489.pair.com:/tmp/cvs-serv36250

Modified Files:
	configuration.thtml 
Log Message:
Change to now show the leftblocks and give UI full screen - did not see anyway to easily reduce the number of subgroup tabs and it does not look good when the navbar wraps. May need a way to get back to the main page easily.

Removed Javascript for configmanager out of template
Added logic to not show Config Group navbar if there was just one config group - as in "Core' 
Changed the way change results are displayed

Index: configuration.thtml
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/layout/professional/admin/config/configuration.thtml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** configuration.thtml	25 Nov 2007 06:59:21 -0000	1.3
--- configuration.thtml	1 Dec 2007 21:20:12 -0000	1.4
***************
*** 1,173 ****
! <script type="text/javascript">
! //<![CDATA[
! function handleAdd(self, array_type, array_name){
!  if(array_type.charAt(0) == "*"){
!    handleAddWithName(self, array_type, array_name, self.nextSibling.value);
!  }else{
!    handleAddWithName(self, array_type, array_name, self.parentNode.parentNode.parentNode.rows.length - 1);
!  }
! }
! 
! function handleAddWithName(self, array_type, array_name, name){
!  array_type = array_type.substring(1);
!  if(array_type.charAt(0) == "*" || array_type.charAt(0) == "%"){
!   add_array(self.parentNode.parentNode.parentNode, array_name, name, (array_type.charAt(0) == "*"), array_type, '1');
!  }else if(array_type == "text"){
!   add_element(self.parentNode.parentNode.parentNode, array_name, name, 'text', '', '1');
!  }else if(array_type == "placeholder"){
!   add_element(self.parentNode.parentNode.parentNode, array_name, name, 'hidden', '1', '1');
!  }
! }
! 
! function add_element(tbl, arr_name, index, disp_type, def_val, deletable){
!  var newRow = tbl.insertRow(tbl.rows.length - 1);
!  titleCell = newRow.insertCell(0);
!  paramCell = newRow.insertCell(1);
!  titleCell.className = "alignright";
!  titleCell.appendChild(document.createTextNode(index));
!  inputBox = document.createElement("input");
!  inputBox.type = disp_type;
!  inputBox.name = arr_name + "[" + index + "]";
!  inputBox.value = def_val;
!  paramCell.appendChild(inputBox);
!  if(deletable){
!   deleteButton = document.createElement("input");
!   deleteButton.type = "button";
!   deleteButton.value = "x";
!   deleteButton.onclick =
!     function(){
!         remove(this)
!     };
!   paramCell.appendChild(deleteButton);
!  }
! }
! 
! function remove(self){
!  cell = self.parentNode.parentNode;
!  cell.parentNode.removeChild(cell);
! }
! 
! function add_array(tbl, arr_name, arr_index, key_names, arr_type, deletable){
!   var newRow = tbl.insertRow(tbl.rows.length - 1);
!   labelCell = newRow.insertCell(0);
!   arrayCell = newRow.insertCell(1);
! 
!   labelCell.appendChild(document.createTextNode(arr_index));
!   labelCell.className = "alignright";
! 
!   arrLink = document.createElement("input");
!   arrLink.type = "button";
!   arrLink.onclick =
!      function(){
!       hide_show_tbl(selectChildByID(this.parentNode, 'arr_table'), this);
!      };
!   arrLink.value = "+";
!   arrayCell.appendChild(arrLink);
! 
!   ele_place_holder = document.createElement("input");
!   ele_place_holder.type = "hidden";
!   ele_place_holder.name = arr_name + "[" + arr_index + "][placeholder]";
!   ele_place_holder.value = "true";
!   arrayCell.appendChild(ele_place_holder);
! 
!   arrayCell.appendChild(document.createTextNode(" "));
! 
!   if(deletable){
!    deleteButton = document.createElement("input");
!    deleteButton.type = "button";
!    deleteButton.value = "x";
!    deleteButton.onclick = function(){
!     remove(this);
!     };
!    arrayCell.appendChild(deleteButton);
!   }
! 
!   arrTable = document.createElement("table");
!   arrTable.style.display = "none";
!   arrTable.id = "arr_table";
! 
! 
!   add_ele_cell = arrTable.insertRow(0).insertCell(0);
!   add_ele_cell.colspan = 2;
!   add_ele_press = document.createElement("input");
!   add_ele_press.type = "button";
!   add_ele_press.value = "Add Element";
!   if(! key_names){
!      add_ele_press.onclick=function(){
!        handleAdd(this, arr_type, arr_name + "[" + arr_index + "]");
!      };
!      add_ele_cell.appendChild(add_ele_press);
!   }else{
!     add_ele_press.onclick=function(){
!      handleAdd(this, arr_type, arr_name + "[" + arr_index + "]");
!     };
!     add_ele_cell.appendChild(add_ele_press);
!     arr_index_box = document.createElement("input");
!     arr_index_box.type = "text";
!     arr_index_box.style.width = "65px";
!     add_ele_cell.appendChild(arr_index_box);
!   }
! 
!   arrayCell.appendChild(arrTable);
! 
! }
! 
! function hide_show_tbl(tbl, button){
!  tbl.style.display = (tbl.style.display != 'none' ? 'none' : '' );
!  button.value = (button.value != '+' ? '+' : '-' );
! }
! 
! function open_group(group_var){
!  cgroup = group_var;
!  document.group.conf_group.value = cgroup;
!  document.group.submit();
! }
! 
! function open_subgroup(sg_var){
!  document.group.subgroup.value = sg_var;
!  document.group.submit();
! }
! 
! function selectChildByID(parent, ID){
!  for(i=0; i < parent.childNodes.length; i++){
!   child = parent.childNodes[i];
!   if(child.id == ID){
!    return child;
!   }
!  }
! }
! 
! function restore(param){
!  document.group.subgroup.value = document.subgroup.sub_group.value;
!  action = document.createElement("INPUT");
!  action.setAttribute("value", "restore");
!  action.setAttribute("name", "set_action");
!  action.setAttribute("type", "hidden");
!  namev = document.createElement("INPUT");
!  namev.setAttribute("value", param);
!  namev.setAttribute("type", "hidden");
!  namev.setAttribute("name", "name");
!  document.group.appendChild(namev);
!  document.group.appendChild(action);
!  document.group.submit();
! }
! 
! function unset(param){
!  document.group.subgroup.value = document.subgroup.sub_group.value;
!  action = document.createElement("INPUT");
!  action.setAttribute("value", "unset");
!  action.setAttribute("name", "set_action");
!  action.setAttribute("type", "hidden");
!  namev = document.createElement("INPUT");
!  namev.setAttribute("value", param);
!  namev.setAttribute("type", "hidden");
!  namev.setAttribute("name", "name");
!  document.group.appendChild(namev);
!  document.group.appendChild(action);
!  document.group.submit();
! }
! 
! //]]>
! </script>
  
  <form method="post" action="configuration.php" name="group">
--- 1,3 ----
! <script type="text/javascript" src="{site_url}/javascript/configmanager.js"></script>
  
  <form method="post" action="configuration.php" name="group">
***************
*** 175,193 ****
  <input type="hidden" value="" name="subgroup"{xhtml}>
  </form>
! <div id="pe_navbar"><table width="100%" cellpadding="0" cellspacing="0" border="0">
!  <tr><td>
!   <div id="navcontainer">
!    <ul id="navlist" style="padding-left:15px;">
! <!-- BEGIN group-selector -->
!    <li>
!      <a  href="#" {select_id} onclick='open_group("{group_select_value}")'><span style="padding-top:5px;">{group_display}</span>
!      </a>
!    </li>
! <!-- END group-selector -->
!    </ul></div>
!   </td>
!  </tr>
! </table></div>
! 
  
  <div id="pe_navbar"><table width="100%" cellpadding="0" cellspacing="0" border="0">
--- 5,30 ----
  <input type="hidden" value="" name="subgroup"{xhtml}>
  </form>
! <div class="pluginInfo" style="display:{show_changeblock};margin-top:5px;margin-bottom:5px;padding-left:20px;border:1px solid #CCC; height: 120px;overflow: auto; min-height: 50px; max-height: 100px;">
!   Changes were successfully made to:
!     {change_block}
! </div>
! <div id="pe_navbar" style="display:{hide_groupselection};">
!     <table width="100%" cellpadding="0" cellspacing="0" border="0">
!          <tr>
!             <td>
!                 <div id="navcontainer">
!                     <ul id="navlist" style="padding-left:15px;">
!                     <!-- BEGIN group-selector -->
!                        <li>
!                          <a  href="#" {select_id} onclick='open_group("{group_select_value}")'><span style="padding-top:5px;">{group_display}</span>
!                          </a>
!                        </li>
!                     <!-- END group-selector -->
!                     </ul>
!                 </div>
!             </td>
!          </tr>
!     </table>
! </div>
  
  <div id="pe_navbar"><table width="100%" cellpadding="0" cellspacing="0" border="0">




More information about the geeklog-cvs mailing list