browse support and images
This commit is contained in:
parent
5cf3a76e24
commit
fcf8214559
7 changed files with 10 additions and 57 deletions
|
|
@ -185,7 +185,7 @@ _r.DataTable.prototype.run=function(){if(this.validate&&!this.validate())
|
|||
return;if(_r.rb_con.cur_rb){if(_r.rb_con.cur_rb.large_report==1){msgprint("This is a very large report and cannot be shown in the browser as it is likely to make your browser very slow.<br><br>Please click on 'Export' to open in a spreadsheet");return;}
|
||||
_r.rb_con.cur_rb.mytabs.items['Result'].expand();}
|
||||
var me=this;this._get_query();if(this.set_data){this.show_result(this.set_data);this.set_data=null;return;}
|
||||
$ds(this.fetching_tag);if(isFF)this.clear_all();var args={'query':me.query,'report_name':'_r.DataTable','show_deleted':1,'sc_id':me.search_criteria?me.search_criteria.name:'','filter_values':me.filter_vals?docstring(me.filter_vals):'','roles':'["'+user_roles.join('","')+'"]'}
|
||||
$ds(this.fetching_tag);if($.browser.mozilla)this.clear_all();var args={'query':me.query,'report_name':'_r.DataTable','show_deleted':1,'sc_id':me.search_criteria?me.search_criteria.name:'','filter_values':me.filter_vals?docstring(me.filter_vals):'','roles':'["'+user_roles.join('","')+'"]'}
|
||||
if(this.is_simple)args.is_simple=1;$c('webnotes.widgets.query_builder.runquery',args,function(r,rt){$dh(me.fetching_tag);me.show_result(r,rt);});}
|
||||
_r.DataTable.prototype.clear_all=function(){if(this.htab&&this.htab.parentNode){this.htab.parentNode.removeChild(this.htab);delete this.htab;}
|
||||
if(this.tab&&this.tab.parentNode){this.tab.parentNode.removeChild(this.tab);delete this.tab;}
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
|
||||
//
|
||||
// MIT License (MIT)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
||||
// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
/* Version Detect */
|
||||
|
||||
var appVer = navigator.appVersion.toLowerCase();
|
||||
var is_minor = parseFloat(appVer);
|
||||
var is_major = parseInt(is_minor);
|
||||
var iePos = appVer.indexOf('msie');
|
||||
if (iePos !=-1) {
|
||||
is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
|
||||
is_major = parseInt(is_minor);
|
||||
}
|
||||
var isIE = (iePos!=-1);
|
||||
var isIE6 = (isIE && is_major <= 6);
|
||||
var isIE7 = (isIE && is_major >= 7);
|
||||
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
|
||||
var isFF = 1;
|
||||
var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
|
||||
if (ffversion>=3) var isFF3 = 1;
|
||||
else if (ffversion>=2) var isFF2 = 1;
|
||||
else if (ffversion>=1) var isFF1 = 1;
|
||||
}
|
||||
var isSafari = navigator.userAgent.indexOf('Safari')!=-1 ? 1 : 0;
|
||||
var isChrome = navigator.userAgent.indexOf('Chrome')!=-1 ? 1 : 0;
|
||||
|
|
@ -47,7 +47,7 @@ var pending_req = 0;
|
|||
|
||||
// new XMLHttpRequest object
|
||||
function newHttpReq() {
|
||||
if (!isIE)
|
||||
if (!$.browser.msie)
|
||||
var r=new XMLHttpRequest();
|
||||
else if (window.ActiveXObject)
|
||||
var r=new ActiveXObject("Microsoft.XMLHTTP");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function freeze(msg, do_freeze) {
|
|||
// blur
|
||||
if(!dialog_back) {
|
||||
dialog_back = $a($i('body_div'), 'div', 'dialog_back');
|
||||
if(isIE) dialog_back.style['filter'] = 'alpha(opacity=60)';
|
||||
$(dialog_back).css('opacity', 0.6);
|
||||
}
|
||||
$ds(dialog_back);
|
||||
|
||||
|
|
|
|||
|
|
@ -416,11 +416,7 @@ AutoSuggest.prototype.createList = function(arr) {
|
|||
}
|
||||
|
||||
this.body = div;
|
||||
|
||||
if(isIE) {
|
||||
$y(div,{border:'1px solid #444'});
|
||||
}
|
||||
|
||||
|
||||
// currently no item is highlighted
|
||||
//
|
||||
|
||||
|
|
@ -477,15 +473,15 @@ AutoSuggest.prototype.setHighlight = function(n)
|
|||
if(this.body.scrollbars) {
|
||||
var cur_y = 0;
|
||||
for(var i=0; i<this.iHigh-1; i++)
|
||||
cur_y += (isIE ? list.childNodes[i].offsetHeight : list.childNodes[i].clientHeight);
|
||||
cur_y += ($.browser.msie ? list.childNodes[i].offsetHeight : list.childNodes[i].clientHeight);
|
||||
|
||||
// scroll up
|
||||
if(cur_y < this.body.scrollTop)
|
||||
this.body.scrollTop = cur_y;
|
||||
|
||||
// scroll down
|
||||
ff_delta = (isFF ? cint(this.iHigh/2) : 0);
|
||||
var h = (isIE ? ele.offsetHeight : ele.clientHeight);
|
||||
ff_delta = ($.browser.mozilla ? cint(this.iHigh/2) : 0);
|
||||
var h = ($.browser.msie ? ele.offsetHeight : ele.clientHeight);
|
||||
if(cur_y >= (this.body.scrollTop + this.oP.maxheight - h))
|
||||
this.body.scrollTop = cur_y - this.oP.maxheight + h + ff_delta;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ _r.DataTable.prototype.run = function() {
|
|||
}
|
||||
|
||||
$ds(this.fetching_tag);
|
||||
if(isFF)this.clear_all();
|
||||
if($.browser.mozilla)this.clear_all();
|
||||
|
||||
var args = {
|
||||
'query':me.query,
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ class Profile:
|
|||
t = webnotes.conn.sql("""select email, first_name, last_name,
|
||||
recent_documents from tabProfile where name = %s""", self.name)[0]
|
||||
|
||||
self.build_permissions()
|
||||
if not self.can_read:
|
||||
self.build_permissions()
|
||||
|
||||
d = {}
|
||||
d['name'] = self.name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue