Scribe.js/static/js/directives/block.js

67 lines
1.5 KiB
JavaScript
Raw Normal View History

2014-11-11 21:20:33 +01:00
(function () {
'use strict';
2014-11-13 21:33:37 +01:00
/**
* Block directives
*
* Blocks ar used in home, folder and dates view
* to display folder name, dates and file name
*/
2014-11-11 21:20:33 +01:00
window.app.directive('block', [function () {
return {
scope : {
2014-11-13 21:33:37 +01:00
/**
* type
*
* @type {String} 'dates' or anything else
*/
2014-11-11 21:20:33 +01:00
type : "=",
2014-11-13 21:33:37 +01:00
/**
* message
*
* Main message. If top and bottom messages,
* main message goes in middle
*
* @type {String}
*/
2014-11-11 21:20:33 +01:00
message : "=",
2014-11-13 21:33:37 +01:00
/**
* messageTop
*
* @type {String}
*/
2014-11-11 21:20:33 +01:00
messageTop : "=",
2014-11-13 21:33:37 +01:00
/**
* messageBottom
*
* @type {String}
*/
2014-11-11 21:20:33 +01:00
messageBottom : "=",
2014-11-13 21:33:37 +01:00
/**
* forceFile
*
* If true, the block won't be a square
* but with be full-wifth in order to contain a file name
*
* @type {Boolean}
*/
2014-11-11 21:20:33 +01:00
forceFile : "="
2014-11-13 21:33:37 +01:00
2014-11-11 21:20:33 +01:00
},
2014-11-13 21:33:37 +01:00
restrict : "E",
2014-11-11 21:20:33 +01:00
templateUrl : 'partials/elements/blocks.html',
2014-11-13 21:33:37 +01:00
replace : true
2014-11-11 21:20:33 +01:00
};
}]);
}());