mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-07 04:47:14 +00:00
(js) New file structure for Angular modules
JavaScript files are now merged by the 'js' Grunt task.
This commit is contained in:
1 parent
b1ff1d4365
commit
1dc5f0d412
65 files changed
+2995
-2397
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* sgFolderStylesheet - Add CSS stylesheet for folder (addressbook or calendar)
|
||||
* @memberof SOGo.Common
|
||||
* @restrict attribute
|
||||
* @param {object} ngModel - the object literal describing the folder (an Addressbook or Calendar instance)
|
||||
* @example:
|
||||
|
||||
<div sg-folder-stylesheet="true"
|
||||
ng-repeat="calendar in calendars.list"
|
||||
ng-model="calendar" />
|
||||
</div>
|
||||
*/
|
||||
function sgFolderStylesheet() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: 'ngModel',
|
||||
scope: {
|
||||
ngModel: '='
|
||||
},
|
||||
template: [
|
||||
'<style type="text/css">',
|
||||
' .bg-folder{{ ngModel.id }} {',
|
||||
' background-color: {{ ngModel.color }} !important;',
|
||||
' }',
|
||||
' .fg-folder{{ ngModel.id }} {',
|
||||
' color: {{ ngModel.color }} !important;',
|
||||
' }',
|
||||
' .checkbox-folder{{ ngModel.id }}.md-checked .md-icon {',
|
||||
' background-color: {{ ngModel.color }} !important;',
|
||||
' }',
|
||||
'</style>'
|
||||
].join('')
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
.module('SOGo.Common')
|
||||
.directive('sgFolderStylesheet', sgFolderStylesheet);
|
||||
})();
|
||||
Reference in new issue
Block a user