mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Greatly improved lightbox view, much cleaner and smoother
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Helpers for Pinry
|
||||
* Descrip: A hodgepodge of useful things to help clean up Pinry's JavaScript.
|
||||
* Authors: Pinry Contributors
|
||||
* Updated: Feb 26th, 2013
|
||||
* Require: jQuery
|
||||
*/
|
||||
|
||||
|
||||
function renderTemplate(templateId, context) {
|
||||
var template = Handlebars.compile($(templateId).html());
|
||||
return template(context);
|
||||
}
|
||||
|
||||
|
||||
function cleanTags(tags) {
|
||||
if (typeof tags === 'string') {
|
||||
tags = tags.split(',');
|
||||
for (var i in tags) tags[i] = tags[i].trim();
|
||||
}
|
||||
return tags
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user