mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-26 11:37:33 +00:00
Removed podnoms.utils dependancy in mixCreateView
This commit is contained in:
13
static/js/app/lib/utils.js
Normal file → Executable file
13
static/js/app/lib/utils.js
Normal file → Executable 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);
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user