//---------------------------------------------------------------------------------
// Submit button.
// $async parameter can have 3 values:
+// null - fallback button not visible in js enabled mode
// false - normal submit via form action
// true - when js is on submition via ajax call
-// null - fallback button not visible in js enabled mode
+// 'process' - ditto with processing indicator in msgbox
//
function submit($name, $value, $echo=true, $title=false, $async=false)
{
$submit_str = "<input type=\"submit\" class=\""
.($async ? 'ajaxsubmit' : 'inputsubmit')
."\""
- .($async === null ? (in_ajax() ? " style='display:none;'" : ' fallback="1"' ): '')
+ .($async === null ? (in_ajax() ? " style='display:none;'" : ' aspect="fallback"' ):
+ ($async === 'process' ? 'aspect="process"' : '') )
." name=\"$name\" id=\"$name\" value=\"$value\""
.($title ? " title='$title'" : '')
.">\n";
include_once($path_to_root . "/includes/current_user.inc");
$_search_button = "<input %s type='submit' class='combo_submit' style='border:0;background:url($path_to_root/themes/"
- ."%s/images/locate.png) no-repeat;%s' fallback='1' name='%s' value=' ' title='"._("Set filter")."'> ";
+ ."%s/images/locate.png) no-repeat;%s' aspect='fallback' name='%s' value=' ' title='"._("Set filter")."'> ";
$_select_button = "<input %s type='submit' class='combo_select' style='border:0;background:url($path_to_root/themes/"
- ."%s/images/button_ok.png) no-repeat;%s' fallback='1' name='%s' value=' ' title='"._("Select")."'> ";
+ ."%s/images/button_ok.png) no-repeat;%s' aspect='fallback' name='%s' value=' ' title='"._("Select")."'> ";
$all_items = reserved_words::get_all();
box.innerHTML= box.innerHTML+'<br>'+msg
}
-function progbar(container) {
- container.innerHTML= "<center><img src='"+
- user.theme+"images/progressbar1.gif' /> "+
- user.loadtxt+"</center>";
+function progbar() {
+ box = document.getElementById('msgbox');
+ box.innerHTML= "<center><table width='98%' border='1' cellpadding=3 "
+ +"style='border-collapse: collapse' bordercolor='#007700'>"
+ +"<tr><td align='center' bgcolor='#ccffcc' >"
+ +"<img src='"+user.theme+"images/progressbar.gif' alt='"
+ +user.loadtxt+"' /></td></tr></table></center><br>";
}
function save_focus(e) {
_set_combo_input(e);
}
},
- 'input.combo2,input[fallback]':
+ 'input.combo2,input[aspect="fallback"]':
function(e) {
// this hides search button for js enabled browsers
e.style.display = 'none';
'input.ajaxsubmit,input.editbutton,input.navibutton':
function(e) {
e.onclick = function() {
+ if (this.getAttribute('aspect') == 'process')
+ progbar();
JsHttpRequest.request(this);
return false;
}