[open-ils-commits] r766 - in conifer/branches/rel_1_6_0/xul/server: . admin (risard)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 3 20:58:30 EST 2010
Author: risard
Date: 2010-02-03 20:58:28 -0500 (Wed, 03 Feb 2010)
New Revision: 766
Added:
conifer/branches/rel_1_6_0/xul/server/admin/
conifer/branches/rel_1_6_0/xul/server/admin/hours.xhtml
conifer/branches/rel_1_6_0/xul/server/admin/index.xhtml
Log:
first cut at hours of operation interface
Added: conifer/branches/rel_1_6_0/xul/server/admin/hours.xhtml
===================================================================
--- conifer/branches/rel_1_6_0/xul/server/admin/hours.xhtml (rev 0)
+++ conifer/branches/rel_1_6_0/xul/server/admin/hours.xhtml 2010-02-04 01:58:28 UTC (rev 766)
@@ -0,0 +1,145 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<head>
+<title>Hours of Operation</title>
+
+<link type='text/css' rel='stylesheet' href='admin.css'/>
+
+<!-- Include required scripts for basic OpenSRF-over-HTTP -->
+<script type='text/javascript' src='/opac/common/js/opensrf.js'></script>
+<script type='text/javascript' src='/opac/common/js/opensrf_xhr.js'></script>
+<script type='text/javascript' src='/opac/common/js/JSON_v1.js'></script>
+<script type='text/javascript' src='/opac/common/js/md5.js'></script>
+<script language='javascript' src='adminlib.js'> </script>
+
+<script type='text/javascript' src='/js/dojo/dojo/dojo.js' djConfig='parseOnLoad: true, isDebug:false'></script>
+
+<script type='text/javascript'>
+
+dojo.require('dojo.cookie');
+dojo.require('openils.User');
+dojo.require('openils.PermaCrud');
+
+var myToken;
+var myOuid;
+
+function initPage(){
+
+ myToken = dojo.cookie('ses'); //need to catch if this goes wrong
+ var user = new openils.User({authtoken:myToken});
+ var pcrud = new openils.PermaCrud({"authtoken":myToken});
+ var myOu = pcrud.retrieve("aou", user.user.ws_ou());
+ myOuid = user.user.ws_ou();
+
+ document.getElementById("title_tag").innerHTML = "<h2>Hours of operation for: " + myOu.shortname() + "</h2>";
+
+ setHours("display");
+}
+
+
+function setHours(action){
+
+ var pcrud = new openils.PermaCrud({"authtoken":myToken});
+ var myHours = pcrud.retrieve("aouhoo", myOuid);
+ var form_count = document.formHours.elements.length;
+ var elem;
+ var i = 0;
+
+ while (elem = document.formHours.elements[i++]){
+ if (action == 'update'){
+ myHours[elem.id](elem.value); //need to add some validation code here when i have a minute
+ }else{
+ elem.value = myHours[elem.id](); //if update then sync
+ }
+ }
+
+ if (action == 'update'){
+ pcrud.update(myHours);
+ document.getElementById("status_tag").innerHTML = "<b>Update Sucessful</b>"; //should check sucess first, don't know how though
+ }
+
+}
+
+
+
+</script>
+
+
+</head>
+<body onload='initPage()'>
+<div id='title_tag'></div>
+<div id='status_tag'></div>
+<div id='divHours' name='divHours'>
+ <form name='formHours' id='formHours'>
+ <table border='0'>
+ <tr>
+ <td></td>
+ <td>From:</td>
+ <td></td>
+ <td>To:</td>
+ </tr>
+ <tr>
+ <td>Sunday</td>
+ <td><input type='text' id='dow_0_open' name='dow_0_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_0_close' name='dow_0_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Monday</td>
+ <td><input type='text' id='dow_1_open' name='dow_1_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_1_close' name='dow_1_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Tuesday</td>
+ <td><input type='text' id='dow_2_open' name='dow_2_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_2_close' name='dow_2_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Wednesday</td>
+ <td><input type='text' id='dow_3_open' name='dow_3_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_3_close' name='dow_3_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Thursday</td>
+ <td><input type='text' id='dow_4_open' name='dow_4_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_4_close' name='dow_4_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Friday</td>
+ <td><input type='text' id='dow_5_open' name='dow_5_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_5_close' name='dow_5_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td>Saturday</td>
+ <td><input type='text' id='dow_6_open' name='dow_6_open' size='8' maxlength='8'></input></td>
+ <td></td>
+ <td><input type='text' id='dow_6_close' name='dow_6_close' size='8' maxlength='8'></input></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+ </table>
+ </form>
+<input type='button' name='submit' id='submit' value='submit' onclick='setHours("update")'></input>
+</div>
+
+
+
+
+
+
+</body>
+</html>
Added: conifer/branches/rel_1_6_0/xul/server/admin/index.xhtml
===================================================================
--- conifer/branches/rel_1_6_0/xul/server/admin/index.xhtml (rev 0)
+++ conifer/branches/rel_1_6_0/xul/server/admin/index.xhtml 2010-02-04 01:58:28 UTC (rev 766)
@@ -0,0 +1,97 @@
+<?xml version='1.0' encoding="UTF-8"?>
+
+<!DOCTYPE html PUBLIC
+ "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
+ <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>&staff.server.admin.index.title;</title>
+ <script>
+ function _l(l,p) {
+ var url = l + location.search;
+ if (p) {
+ if (location.search) { url += '&'; } else { url += '?'; }
+ url += p;
+ }
+ dump('setting location.href to ' + url + '\n');
+ location.href = url;
+ }
+ function getBuildId() { return location.href.match(/\/xul\/(.+?)\/server\//)[1]; }
+ </script>
+ <style type='text/css'>
+ body { background-color: white; }
+ </style>
+ </head>
+ <body>
+ <center>
+ <div style='height: 40px; margin-top: 20px; font-weight: bold; font-size: 14pt;'>
+ &staff.server.admin.index.title;
+ </div>
+ <img src='../skin/media/images/tools.png'/>
+ <style>
+ td { text-align: center; }
+ </style>
+ <br/> <br/>
+ <table width='100%'>
+ <thead>
+ <tr>
+ <th width='30%'>&staff.server.admin.index.workstation_configuration;</th>
+ <th width='30%'>&staff.server.admin.index.library_configuration;</th>
+ <th width='30%'>&staff.server.admin.index.maintenance_reports;</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr valign="top">
+ <td>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("font_settings.xul");'>&staff.server.admin.index.fonts_and_sounds;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("printer_settings.html");'>&staff.server.admin.index.printer;</a>
+ </div>
+ </td><td>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("closed_dates.xhtml");'>&staff.server.admin.index.closed_dates;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("hours.xhtml");'>Hours of Operation</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("copy_locations.xhtml");'>&staff.server.admin.index.copy_locations;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("org_unit_settings.xhtml");'>&staff.server.admin.index.library_settings;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("non_cat_types.xhtml");'>&staff.server.admin.index.non_cataloged_types;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("stat_cat_editor.xhtml");'>&staff.server.admin.index.statistical_categories;</a>
+ </div>
+ </td><td>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/xul/rel_1_6_0_0/server/patron/holds.xul",{"tab_name":"&staff.server.admin.index.hold_pull_list;"},{});'>&staff.server.admin.index.hold_pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("hold_pull_list_classic.xhtml");'>&staff.server.admin.index.hold_pull_list_classic;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l( "/reports/oils_rpt.xhtml","build_id=" + getBuildId() );'>&staff.server.admin.index.reports;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:_l("cash_reports.xhtml");'>&staff.server.admin.index.cash_reports;</a>
+ </div>
+ <div style='padding: 8px;'>
+ <a href='javascript:window.xulG.new_tab("/xul/rel_1_6_0_0/server/admin/transit_list.xul",{"tab_name":"&staff.server.admin.index.transits;"},{});'>&staff.server.admin.index.transit_list;</a>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </center>
+ </body>
+</html>
More information about the open-ils-commits
mailing list