always updating html templates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jun 2005 14:39:57 +0000 (14:39 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Jun 2005 14:39:57 +0000 (14:39 +0000)
added an exception or to to ex.ttk (much more to come)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@888 dcc99617-32d9-48b4-a31d-7c20da2025e4

12 files changed:
Open-ILS/src/templates/html/box
Open-ILS/src/templates/html/col
Open-ILS/src/templates/html/iframe
Open-ILS/src/templates/html/row
Open-ILS/src/templates/opac/logic/page_router.ttk
Open-ILS/src/templates/opac/pages/chunks/body_header.ttk
Open-ILS/src/templates/opac/pages/chunks/init.ttk
Open-ILS/src/templates/opac/pages/chunks/status_bar.ttk
Open-ILS/src/templates/opac/pages/login.ttk
Open-ILS/src/templates/opac/pages/opac_start.ttk
Open-ILS/src/templates/opac/pages/record_detail.ttk
Open-ILS/src/templates/strings/ex.ttk

index 4cbeb9c..0cfa9c8 100644 (file)
@@ -1,10 +1,20 @@
-[%# html/bar: table containing a single row and a single cell
-  # ARGS:
-  #    as per html/table, html/row and html/cell
--%]
-[% WRAPPER html/table;
-    WRAPPER html/row + html/cell width='' col='';
-     content;
-    END;
-   END;
+[%
+       "<div";
+
+       IF class;                       " class='"                      _ class _ "'";                  END;
+       IF id;                          " id='"                         _ id _ "'";                             END;
+       IF valign;                              " valign='"                             _ valign _ "'";                         END;
+       IF style;                               " style='"                              _ style _ "'";                          END;
+       IF visibility;          " visibility='" _ visibility _ "'";     END;
+       IF onclick;                             " onclick='"                            _ onclick _ "'";                                END;
+       IF onblur;                              " onblur='"                             _ onblur _ "'";                         END;
+       IF onmouseover;                         " onmouseover='"                                _ onmouseover _ "'";                            END;
+       IF onmouseout;                          " onmouseout='"                         _ onmouseout _ "'";                             END;
+       IF onmousedown;                         " onmousedown='"                                _ onmousedown _ "'";                            END;
+       IF onmouseup;                           " onmouseup='"                          _ onmouseup _ "'";                              END;
+
+       ">";
+       content;
+       "</div>";
 %]
+
index f9b6e4e..3a1570c 100644 (file)
@@ -6,6 +6,7 @@
        IF class; " class='" _ class _ "'"; END;
        IF id; " id='" _ id _ "'"; END;
        IF style; " style='" _ style _ "'"; END;
+       IF nowrap; " nowrap='" _ nowrap _ "'"; END;
        
        ">";
        IF content; content; END;
index fb4bbb0..a0aabe6 100644 (file)
@@ -2,12 +2,12 @@
        "<iframe";
        IF src; " src='" _ src _ "'"; END;
        IF id; " id='" _ id _ "'"; END;
+       IF frameborder.defined; " frameborder='" _ frameborder _ "'"; END;
        IF class; " class='" _ class _ "'"; END;
        IF style; " style='" _ style _ "'"; END;
-       IF frameborder; " frameborder='" _ frameborder _ "'"; END;
+       IF scrolling; " scrolling='" _ scrolling _ "'"; END;
        IF height; " height='" _ height _ "'"; END;
        IF width; " width='" _ width _ "'"; END;
-       IF width; " width='" _ width _ "'"; END;
        IF name; " name='" _ name _ "'"; END;
        "/>";
 %]
index 9075dc9..545bde8 100644 (file)
@@ -10,6 +10,7 @@
     [%- IF col     %] bgcolor="[% col %]"[%     END %]
     [%- IF id     %] id="[% id %]"[%     END %]
     [%- IF align   %] align="[% align %]"[%     END %]
+    [%- IF class  %] class="[% class %]"[%   END %]
     [%- IF valign  %] valign="[% valign %]"[%   END %]>
 [%- content -%]
 </tr>
index d51b872..0da0232 100644 (file)
@@ -1,8 +1,9 @@
 [%
 
        target = cgi.param("target");   
+       sub_frame = cgi.param("sub_frame");
 
-       IF ! target;
+       IF ! target or sub_frame;
                INCLUDE opac/pages/main.ttk;
 
        ELSIF target == "start";
index d687539..9f5b0c7 100644 (file)
@@ -3,6 +3,8 @@
        INCLUDE opac/pages/chunks/opac_search_bar.ttk;
 
        WRAPPER html/div id='page_trail';END;
+       WRAPPER html/div id='deep_link_div';END;
+
        lines(1);
 
        INCLUDE opac/pages/chunks/status_bar.ttk;
index f8def67..c1b4f7b 100644 (file)
 
        WRAPPER html/js;
                '
-               if(parent) logicNode = parent;
-               else logicNode = window;
+               if(!parent || !parent.frames["appframe"]) { 
+                       /* redirect to the outer frame */
+                       location.href = location.href + "&sub_frame=1"; 
+               }
+
+               logicNode = parent;
                logicNode.paramObj = new Object();
                ';
                FOR pname IN cgi.param();
 
                        globalAppFrame = window;
                        globalPage = logicNode.globalPage;
+                       setDeepLink();
+               }
+
+               function setDeepLink() {
+                       var node = document.getElementById("deep_link_div");
+                       if(node) {
+                               var a = document.createElement("a");
+                               a.setAttribute("href", location.href + "&sub_frame=1");
+                               a.setAttribute("target", "_blank");
+                               a.appendChild(document.createTextNode("Link to this page"));
+                               node.appendChild(a);
+                       } 
                }
                ';
        END;
index 43107b7..63497f5 100644 (file)
@@ -1,4 +1,7 @@
 [%
+       WRAPPER html/div;
+
+
        WRAPPER html/table  + html/row id='top_status_bar' class='status_bar';
 
                cell(id='now_searching_cell', class='now_searching_cell');
@@ -33,4 +36,5 @@
                END;
 
        END;
+       END;
 %]
index 96a9323..33ebe7d 100644 (file)
@@ -13,6 +13,7 @@
                        globalPage.session.exp_days = "' _ global.config.session_timeout _ '";
                        globalPage.login_success_msg = "<b>' _ tm.success _ '</b>";
                        globalPage.login_failure_msg = "<b>' _ tm.failure _ '</b>";
+                       document.getElementById("login_username").focus();
                        ';
 
                        # here, this just provides the color backdrop for the search bar
index 63b8764..382eb53 100644 (file)
@@ -57,6 +57,8 @@
                        PROCESS search_range;
 
                        lines(3);
+                       anchor( id='login_link',  href='?target=login', text = "Login" );
+                       space(3);
                        anchor( id='adv_search_link',  href='?target=advanced_search', text = "Advanced Search" );
 
                END;
index 5edfe9a..3f272fd 100644 (file)
                        WRAPPER html/box id='record_detail_main_box';
 
                                WRAPPER html/box id='detail_items_div';
+
                                        WRAPPER html/table id='record_detail_table';
-       
+
                                                WRAPPER html/row;
-                                                       cell(content="Record Details", class="detail_header_cell");
+                                                       cell(content="Record Details", nowrap='nowrap', class="detail_header_cell");
                                                        cell(id='record_detail_view_marc', class="detail_header_cell");
+                                                       cell(id='record_detail_pic_cell', rowspan='10');
                                                END;
 
        
-                                               WRAPPER html/row;
-                                                       cell(content="Title");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Title", nowrap='nowrap', class='detail_item_label');
                                                        cell(id='record_detail_title_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Author");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Author", class='detail_item_label');
                                                        cell(id='record_detail_author_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="ISBN");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="ISBN", class='detail_item_label');
                                                        cell(id='record_detail_isbn_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Edition");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Edition", class='detail_item_label');
                                                        cell(id='record_detail_edition_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Publication Date");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Publication Date", class='detail_item_label');
                                                        cell(id='record_detail_pubdate_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Publisher");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Publisher", class='detail_item_label');
                                                        cell(id='record_detail_publisher_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Title Control Number");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Title Control Number", nowrap='nowrap', class='detail_item_label');
                                                        cell(id='record_detail_tcn_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Type of Resource");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Type of Resource", class='detail_item_label');
                                                        cell(id='record_detail_resource_cell');
                                                END;
        
-                                               WRAPPER html/row;
-                                                       cell(content="Subjects");
+                                               WRAPPER html/row class='detail_item_row';
+                                                       cell(content="Subjects", class='detail_item_label');
                                                        cell(id='record_detail_subject_cell');
                                                END;
        
                                        END;
+
                                END;
+
+                               lines(1);
+                               box(id='record_detail_copy_info');
+
                        END;
                                                
                END; # body
index 39bcf7c..5ab1649 100644 (file)
@@ -30,4 +30,7 @@
        IF type == ex_types.DUPLICATE_USER_USERNAME;
                ret("Username is a duplicate"); END;
 
+       IF type == ex_types.USER_WRONG_PASSWORD;
+               ret("Password is incorrect");   END;
+
 -%]