r8883@llin: dpavlin | 2005-11-14 21:39:14 +0100
[webpac2] / web / browse.cgi
index 5eeba84..6f29b2c 100755 (executable)
@@ -74,7 +74,7 @@ if ($q->path_info =~ m#xml#) {
 <action type='javascript' errorCode='' errorMessage='' >
 <!--
        var el = iwfGetById('div_record_nr');
-       if (el) el.innerHTML = '<strike>$rec</strike>';
+       if (el) el.innerHTML = '<strike>&nbsp;$rec&nbsp;</strike>';
 //-->
 </action>
 </response>
@@ -101,11 +101,13 @@ if ($q->path_info =~ m#xml#) {
 
                        print qq{<response>
 <action type='html' target='div_status' errorCode='' errorMessage='' >
-$template saved
+<tt>$template</tt> saved
 </action>
 <action type='js'>
 <!--
+iwfShow('div_status', 1);
 reload_rec();
+iwfHideGentlyDelay('div_status', 2, 2000, 1);
 -->
 </action>
 </response>
@@ -121,9 +123,7 @@ reload_rec();
 <action type='html' target='div_template' errorCode='' errorMessage='' >
 <pre>}, Dumper($q->Vars), qq{</pre>
 
-<form name="frmEditor" action="$self" method="post"
-iwfTarget="div_status"
->
+<form name="frmEditor" action="$self" method="post" iwfTarget="div_status" >
 
 <textarea name="tt_template" cols="80" rows="10" style="display: block;">
 $tmpl
@@ -131,13 +131,20 @@ $tmpl
 
 <br/>
 <input type="button" name="save_template" value="Save" onclick="javascript:iwfRequest(this);" />
-<input type="checkbox" name="checkin_template" id="checkin_checkbox" label="checkin" />
-<span id="div_status" style="color: #808080;">idle</span>
+<!--
+<input type="checkbox" name="checkin_template" id="checkin_checkbox" label="checkin" /> checkin
+-->
+&nbsp;&nbsp;<span id="div_status" style="color: #808080;">idle</span>
 
 <input type='hidden' value='hidden post value' name='hidValue' />
 
 </form>
 </action>
+<action type='js'>
+<!--
+iwfHideGentlyDelay('div_status', 2, 2000, 1);
+-->
+</action>
 </response>
                };
 
@@ -163,6 +170,11 @@ function update_status(text) {
 }
 
 function load_rec(nr) {
+       if (nr == 1) {
+               iwfHide('a_left_arr', 1);
+       } else {
+               iwfShow('a_left_arr', 1);
+       }
        update_status(nr+'...');
        iwfRequest( url+'/xml/?rec='+nr, 'div_record' );
        iwfOpacity('div_record', 30);
@@ -175,8 +187,10 @@ function inc_rec() {
 }
 
 function dec_rec() {
-       rec--;
-       load_rec(rec);
+       if (rec > 1) {
+               rec--;
+               load_rec(rec);
+       }
        return false;
 }
 
@@ -202,12 +216,12 @@ template = <tt>$template</tt><br/>
 </div>
 
 <div style="background: #e0e0e0; padding: 0.5em; display: block;">
-       <a href="$self?rec=}, $rec - 1, qq{" onClick="return dec_rec();">&#8678;</a>&nbsp;
+       <a id="a_left_arr" href="$self?rec=}, $rec - 1, qq{" onClick="return dec_rec();">&#8678;</a>
        <span id="div_record_nr"> none </span>
 
-       <a href="$self?rec=}, $rec + 1, qq{" onClick="return inc_rec();">&#8680;</a>&nbsp;
-       <a href="$self?rec=}, $rec, qq{" onClick="return reload_rec();">&#8634;</a>&nbsp;
-       <a href="#" onClick="iwfRefreshLog(); return false;">&#9636;</a>&nbsp;
+       <a id="a_right_arr" href="$self?rec=}, $rec + 1, qq{" onClick="return inc_rec();">&#8680;</a>
+       <a id="a_reload" href="$self?rec=}, $rec, qq{" onClick="return reload_rec();">&#8634;</a>
+       <a href="#" onClick="iwfRefreshLog(); return false;">&#9636;</a>
 
 </div>