projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #8101 from colemanw/CRM-18379
[civicrm-core.git]
/
js
/
jquery
/
jquery.dashboard.js
diff --git
a/js/jquery/jquery.dashboard.js
b/js/jquery/jquery.dashboard.js
index 489345b89c4b60cb06960ddf2732ac17fd62584d..d1f68bb4e16badc3d23e99def5a6048643ba2cf8 100644
(file)
--- a/
js/jquery/jquery.dashboard.js
+++ b/
js/jquery/jquery.dashboard.js
@@
-1,8
+1,8
@@
/**
+--------------------------------------------------------------------+
/**
+--------------------------------------------------------------------+
- | CiviCRM version 4.
6
|
+ | CiviCRM version 4.
7
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
5
|
+ | Copyright CiviCRM LLC (c) 2004-201
6
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-36,8
+36,11
@@
* Draggable
* UI Core
*
* Draggable
* UI Core
*
+ * NOTE: This file is viewed as "legacy" and shouldn't be used to
+ * develop new functionality. Its lint problems are grandfathered
+ * (although if someone wants to cleanup+test, please feel welcome).
*/
*/
-
+/* jshint ignore:start */
(function($) { // Create closure.
// Constructor for dashboard object.
$.fn.dashboard = function(options) {
(function($) { // Create closure.
// Constructor for dashboard object.
$.fn.dashboard = function(options) {
@@
-266,7
+269,7
@@
// Callback for when a user starts resorting a list. Hides all the empty placeholders.
function hideEmptyPlaceholders(e, ui) {
for (var c in dashboard.columns) {
// Callback for when a user starts resorting a list. Hides all the empty placeholders.
function hideEmptyPlaceholders(e, ui) {
for (var c in dashboard.columns) {
- if(
typeof dashboard.columns[c] == 'object
' ) dashboard.columns[c].emptyPlaceholder.hide();
+ if(
(typeof dashboard.columns[c]) == 'object
' ) dashboard.columns[c].emptyPlaceholder.hide();
}
}
}
}
@@
-306,14
+309,14
@@
};
widget.minimize = function() {
$('.widget-content', widget.element).slideUp(opts.animationSpeed);
};
widget.minimize = function() {
$('.widget-content', widget.element).slideUp(opts.animationSpeed);
- $(widget.controls.minimize.element).addClass( '
maximize-icon
' );
- $(widget.controls.minimize.element).removeClass( '
minimize-ico
n' );
+ $(widget.controls.minimize.element).addClass( '
fa-caret-right
' );
+ $(widget.controls.minimize.element).removeClass( '
fa-caret-dow
n' );
widget.minimized = true;
};
widget.maximize = function() {
$('.widget-content', widget.element).slideDown(opts.animationSpeed);
widget.minimized = true;
};
widget.maximize = function() {
$('.widget-content', widget.element).slideDown(opts.animationSpeed);
- $(widget.controls.minimize.element).removeClass( '
maximize-icon
' );
- $(widget.controls.minimize.element).addClass( '
minimize-ico
n' );
+ $(widget.controls.minimize.element).removeClass( '
fa-caret-right
' );
+ $(widget.controls.minimize.element).addClass( '
fa-caret-dow
n' );
widget.minimized = false;
};
widget.minimized = false;
};
@@
-422,7
+425,7
@@
// Adds controls to a widget. id is for internal use and image file name in images/dashboard/ (a .gif).
widget.addControl = function(id, control) {
// Adds controls to a widget. id is for internal use and image file name in images/dashboard/ (a .gif).
widget.addControl = function(id, control) {
- var markup = '<a class="
widget-icon ' + id + '-icon
" alt="' + control.description + '" title="' + control.description + '"></a>';
+ var markup = '<a class="
crm-i ' + control.icon + '
" alt="' + control.description + '" title="' + control.description + '"></a>';
control.element = $(markup).prependTo($('.widget-controls', widget.element)).click(control.callback);
};
control.element = $(markup).prependTo($('.widget-controls', widget.element)).click(control.callback);
};
@@
-453,19
+456,23
@@
widget.controls = {
settings: {
description: ts('Configure this dashlet'),
widget.controls = {
settings: {
description: ts('Configure this dashlet'),
- callback: widget.toggleSettings
+ callback: widget.toggleSettings,
+ icon: 'fa-wrench'
},
minimize: {
description: ts('Collapse or expand'),
},
minimize: {
description: ts('Collapse or expand'),
- callback: widget.toggleMinimize
+ callback: widget.toggleMinimize,
+ icon: 'fa-caret-down',
},
fullscreen: {
description: ts('View fullscreen'),
},
fullscreen: {
description: ts('View fullscreen'),
- callback: widget.enterFullscreen
+ callback: widget.enterFullscreen,
+ icon: 'fa-expand',
},
close: {
description: ts('Remove from dashboard'),
},
close: {
description: ts('Remove from dashboard'),
- callback: widget.remove
+ callback: widget.remove,
+ icon: 'fa-times'
}
};
// End public properties of widget.
}
};
// End public properties of widget.