Removed podnoms.utils dependancy in mixCreateView

This commit is contained in:
Fergal Moran
2013-06-19 19:24:50 +01:00
parent c6dc030af0
commit eb77f0fbb9
787 changed files with 45 additions and 340 deletions

13
static/js/app/lib/utils.js Normal file → Executable file
View File

@@ -1,8 +1,8 @@
// Generated by CoffeeScript 1.6.2
// Generated by CoffeeScript 1.3.3
(function() {
define(['jquery', 'bootstrap', 'toastr'], function($, bootstrap, toastr) {
var _this = this;
return {
modal: function(url) {
if (url) {
@@ -24,7 +24,6 @@
},
checkPlayCount: function() {
var _this = this;
if (document.cookie.indexOf("sessionId")) {
$.getJSON("/ajax/session_play_count", function(data) {
console.log("utils: got playcount");
@@ -43,6 +42,14 @@
},
showAlert: function(title, message) {
return toastr.success(message, title);
},
generateGuid: function() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
var r, v;
r = Math.random() * 16 | 0;
v = (c === "x" ? r : r & 0x3 | 0x8);
return v.toString(16);
});
}
};
});