Author: hnategh
New Revision: 55761
URL: http://svn.stylite.de/viewvc/egroupware?rev=55761&view=rev
Log:
Implement readonly for file widget. Additionally, make a generic style for readonly widgets
Modified:
trunk/egroupware/api/js/etemplate/et2_widget_file.js
trunk/egroupware/api/templates/default/etemplate2.css
trunk/filemanager/js/app.js
— trunk/egroupware/api/js/etemplate/et2_widget_file.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_widget_file.js Mon Apr 18 12:37:08 2016
@@ -182,7 +182,7 @@
});
var self = this;
// trigger native input upload file
@@ -649,6 +649,29 @@
// In case it didn’t make it to the list (error)
target.remove();
$j(e.target).remove();
- },
-
- /**
-
-
-
-
@param {boolean} _ro boolean readonly state, true means readonly
- */
- set_readonly: function(_ro)
- {
-
if (typeof _ro != "undefined")
-
{
-
this.options.readonly = _ro;
-
this.span.toggleClass('et2_file_ro',_ro);
-
if (this.options.readonly)
-
{
-
this.span.unbind('click');
-
}
-
else
-
{
-
var self = this;
-
this.span.off().bind('click',function(){self.input.click()});
-
}
-
}
}
});}).call(this);
— trunk/egroupware/api/templates/default/etemplate2.css (original)
+++ trunk/egroupware/api/templates/default/etemplate2.css Mon Apr 18 12:37:08 2016
@@ -2639,4 +2639,12 @@
border-bottom: 1px solid #E6E6E6;
height: 50px;
}
-tr.dialogHeader2 td {padding-top:15px;}
+tr.dialogHeader2 td {padding-top:15px;}
+
+/readonly widget style/
+.et2_button_ro,.et2_file_span.et2_button.et2_file_ro {
- opacity: 0.5;
- background-color: initial !important;
- box-shadow: none !important;
- cursor: not-allowed !important;
+}
— trunk/filemanager/js/app.js (original)
+++ trunk/filemanager/js/app.js Mon Apr 18 12:37:08 2016
@@ -889,20 +889,7 @@
var widget = etemplate2.getById(id).widgetContainer.getWidgetById(ids[i]);
if (widget)
{
-
if (widget._type == 'button' || widget._type == 'buttononly')
-
{
-
widget.set_readonly(_ro);
-
}
-
// upload
-
else if (widget.disabled != _ro)
-
{
-
// fix width of path-widget to kope with hidden/shown upload
-
var path_parent = jQuery(this.path_widget[id].getDOMNode().parentNode);
-
var width = jQuery(widget.getDOMNode()).outerWidth(true);
-
path_parent.css('right', (parseInt(path_parent.css('right'))+(_ro?-1:1)*width)+'px');
-
-
widget.set_disabled(_ro);
-
}
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs