1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-08 21:18:00 +03:00

A cuople more fixes && refactoring

This commit is contained in:
Adolfo Gómez 2013-11-20 11:31:23 +00:00
parent 4b2eae58b1
commit 17b20ab684
4 changed files with 50 additions and 34 deletions

View File

@ -1,8 +1,6 @@
/* /*
Based on 'SB Admin' from http://startbootstrap.com Based on 'SB Admin' from http://startbootstrap.com
'SB Admin' HTML Template by Start Bootstrap. 'SB Admin' HTML Template by Start Bootstrap.
All Start Bootstrap themes are licensed under Apache 2.0. All Start Bootstrap themes are licensed under Apache 2.0.
For more info and more free Bootstrap 3 HTML themes, visit http://startbootstrap.com! For more info and more free Bootstrap 3 HTML themes, visit http://startbootstrap.com!
*/ */
@ -48,7 +46,6 @@ body {
font-size: 12px; font-size: 12px;
} }
/* Nav Announcements */ /* Nav Announcements */
.announcement-heading { .announcement-heading {
@ -95,6 +92,10 @@ table.tablesorter thead tr th:hover {
.label-tbl-button { .label-tbl-button {
display: none; display: none;
} }
.white {
color: white;
}
/* Edit Below to Customize Widths > 768px */ /* Edit Below to Customize Widths > 768px */
@media (min-width:768px) { @media (min-width:768px) {

View File

@ -22,7 +22,7 @@
/* If Mousedown registers a temporal mouseUp event on parent, to lauch button click */ /* If Mousedown registers a temporal mouseUp event on parent, to lauch button click */
$this.mousedown(function(event){ $this.mousedown(function(event){
$this.parent().mouseup(function(e){ $('body').mouseup(function(e){
// Remove temporal mouseup handler // Remove temporal mouseup handler
$(this).unbind('mouseup'); $(this).unbind('mouseup');

View File

@ -114,7 +114,7 @@ if ($.fn.DataTable.TableTools) {
$.extend(true, $.fn.DataTable.TableTools.classes, { $.extend(true, $.fn.DataTable.TableTools.classes, {
"container" : "DTTT btn-group-3d", "container" : "DTTT btn-group-3d",
"buttons" : { "buttons" : {
"normal" : "btn btn3d-default", "normal" : "btn",
"disabled" : "disabled" "disabled" : "disabled"
}, },
"collection" : { "collection" : {

View File

@ -17,28 +17,43 @@
// Several convenience "constants" for tables // Several convenience "constants" for tables
gui.config.dataTablesLanguage = { gui.config.dataTablesLanguage = {
"sLengthMenu" : gettext("_MENU_ records per page"), 'sLengthMenu' : gettext('_MENU_ records per page'),
"sZeroRecords" : gettext("Empty"), 'sZeroRecords' : gettext('Empty'),
"sInfo" : gettext("Records _START_ to _END_ of _TOTAL_"), 'sInfo' : gettext('Records _START_ to _END_ of _TOTAL_'),
"sInfoEmpty" : gettext("No records"), 'sInfoEmpty' : gettext('No records'),
"sInfoFiltered" : gettext("(filtered from _MAX_ total records)"), 'sInfoFiltered' : gettext('(filtered from _MAX_ total records)'),
"sProcessing" : gettext("Please wait, processing"), 'sProcessing' : gettext('Please wait, processing'),
"sSearch" : gettext("Filter"), 'sSearch' : gettext('Filter'),
"sInfoThousands" : django.formats.THOUSAND_SEPARATOR, 'sInfoThousands' : django.formats.THOUSAND_SEPARATOR,
"oPaginate" : { 'oPaginate' : {
"sFirst" : gettext("First"), 'sFirst' : gettext('First'),
"sLast" : gettext("Last"), 'sLast' : gettext('Last'),
"sNext" : gettext("Next"), 'sNext' : gettext('Next'),
"sPrevious" : gettext("Previous"), 'sPrevious' : gettext('Previous'),
} }
}; };
gui.config.dataTableButtonsText = { gui.config.dataTableButtons = {
'new': '<span class="fa fa-pencil"></span> <span class="label-tbl-button">' + gettext('New') + '</span>', 'new': {
'edit': '<span class="fa fa-edit"></span> <span class="label-tbl-button">' + gettext('Edit') + '</span>', text: '<span class="fa fa-pencil"></span> <span class="label-tbl-button">' + gettext('New') + '</span>',
'delete': '<span class="fa fa-eraser"></span> <span class="label-tbl-button">' + gettext('Delete') + '</span>', css: 'btn3d btn3d-primary btn3d-tables',
'refresh': '<span class="fa fa-refresh"></span> <span class="label-tbl-button">' + gettext('Refresh') + '</span>', },
'xls': '<span class="fa fa-save"></span> <span class="label-tbl-button">' + gettext('Xls') + '</span>', 'edit': {
text: '<span class="fa fa-edit"></span> <span class="label-tbl-button">' + gettext('Edit') + '</span>',
css: 'disabled btn3d-default btn3d btn3d-tables',
},
'delete': {
text: '<span class="fa fa-eraser"></span> <span class="label-tbl-button">' + gettext('Delete') + '</span>',
css: 'disabled btn3d-default btn3d btn3d-tables',
},
'refresh': {
text: '<span class="fa fa-refresh"></span> <span class="label-tbl-button">' + gettext('Refresh') + '</span>',
css: 'btn3d-primary btn3d btn3d-tables',
},
'xls': {
text: '<span class="fa fa-save"></span> <span class="label-tbl-button">' + gettext('Xls') + '</span>',
css: 'btn3d-info btn3d btn3d-tables',
},
}; };
gui.table = function(title, table_id, options) { gui.table = function(title, table_id, options) {
@ -396,42 +411,42 @@ GuiElement.prototype = {
case 'new': case 'new':
btn = { btn = {
"sExtends" : "text", "sExtends" : "text",
"sButtonText" : gui.config.dataTableButtonsText['new'], "sButtonText" : gui.config.dataTableButtons['new'].text,
"fnSelect" : deleteSelected, "fnSelect" : deleteSelected,
"fnClick" : clickHandlerFor(options.onDelete, 'delete'), "fnClick" : clickHandlerFor(options.onDelete, 'delete'),
"sButtonClass" : "disabled btn3d btn3d-tables" "sButtonClass" : gui.config.dataTableButtons['new'].css,
}; };
break; break;
case 'edit': case 'edit':
btn = { btn = {
"sExtends" : "text", "sExtends" : "text",
"sButtonText" : gui.config.dataTableButtonsText['edit'], "sButtonText" : gui.config.dataTableButtons.edit.text,
"fnSelect" : editSelected, "fnSelect" : editSelected,
"fnClick" : clickHandlerFor(options.onEdit, 'edit'), "fnClick" : clickHandlerFor(options.onEdit, 'edit'),
"sButtonClass" : "disabled btn3d btn3d-tables" "sButtonClass" : gui.config.dataTableButtons.edit.css,
}; };
break; break;
case 'delete': case 'delete':
btn = { btn = {
"sExtends" : "text", "sExtends" : "text",
"sButtonText" : gui.config.dataTableButtonsText['delete'], "sButtonText" : gui.config.dataTableButtons['delete'].text,
"fnSelect" : deleteSelected, "fnSelect" : deleteSelected,
"fnClick" : clickHandlerFor(options.onDelete, 'delete'), "fnClick" : clickHandlerFor(options.onDelete, 'delete'),
"sButtonClass" : "disabled btn3d btn3d-tables" "sButtonClass" : gui.config.dataTableButtons['delete'].css,
}; };
break; break;
case 'refresh': case 'refresh':
btn = { btn = {
"sExtends" : "text", "sExtends" : "text",
"sButtonText" : gui.config.dataTableButtonsText['refresh'], "sButtonText" : gui.config.dataTableButtons.refresh.text,
"fnClick" : refreshFnc, "fnClick" : refreshFnc,
"sButtonClass" : "btn3d-primary btn3d btn3d-tables" "sButtonClass" : gui.config.dataTableButtons.refresh.css,
}; };
break; break;
case 'xls': case 'xls':
btn = { btn = {
"sExtends" : "text", "sExtends" : "text",
"sButtonText" : gui.config.dataTableButtonsText['xls'], "sButtonText" : gui.config.dataTableButtons.xls.text,
"fnClick" : function(){ "fnClick" : function(){
api.templates.get('spreadsheet', function(tmpl) { api.templates.get('spreadsheet', function(tmpl) {
var styles = { 'bold': 's21', }; var styles = { 'bold': 's21', };
@ -471,7 +486,7 @@ GuiElement.prototype = {
}, 20); }, 20);
}); });
}, },
"sButtonClass" : "btn3d-info btn3d btn3d-tables" "sButtonClass" : gui.config.dataTableButtons.xls.css,
}; };
} }