Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CDN files locally. #117

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions webserver/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<% } -%>
<link rel="shortcut icon" type="image/png" href="/pads/lib/img/icon.png" id="dynamic-favicon"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/emojione/2.0.0/assets/css/emojione.min.css"/>
<link href="https://cdn.mqp.io/css/mdi.min.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="https://cdn.mqp.io/css/tour.min.css">
<link href="/pads/lib/css/mdi.min.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/pads/lib/css/tour.min.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/back.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/dash.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/video.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/chat.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/icons.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/menus.css">
<link rel="stylesheet" type="text/css" href="https://cdn.mqp.io/css/minicolors.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/minicolors.css">
</head>
<body data-ng-app="musiqpad" data-ng-controller="MainController">
<div id="creds-back">
Expand Down Expand Up @@ -752,13 +752,13 @@
<script src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.ui/1.11.4/jquery-ui.min.js"></script>
<script src="https://cdn.jsdelivr.net/angularjs/1.5.5/angular.min.js"></script>
<script src="https://cdn.mqp.io/js/minicolors.js"></script>
<script src="https://cdn.mqp.io/js/angular-minicolors.js"></script>
<script src="https://cdn.mqp.io/js/jquery.caret.js"></script>
<script src="/pads/lib/js/minicolors.js"></script>
<script src="/pads/lib/js/angular-minicolors.js"></script>
<script src="/pads/lib/js/jquery.caret.js"></script>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script src="https://cdn.mqp.io/js/tour.min.js"></script>
<script src="https://cdn.mqp.io/js/sha256.js"></script>
<script src="https://cdn.mqp.io/js/jquery.aautoscroll.2.4.js"></script>
<script src="/pads/lib/js/tour.min.js"></script>
<script src="/pads/lib/js/sha256.js"></script>
<script src="/pads/lib/js/jquery.aautoscroll.2.4.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="config"></script>
<script src="/pads/lib/js/app.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions webserver/public/lib/css/mdi.min.css

Large diffs are not rendered by default.

268 changes: 268 additions & 0 deletions webserver/public/lib/css/minicolors.css

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions webserver/public/lib/css/tour.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions webserver/public/lib/js/angular-minicolors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
'use strict';

angular.module('minicolors', []);

angular.module('minicolors').provider('minicolors', function () {
this.defaults = {
theme: 'bootstrap',
position: 'top left',
defaultValue: '',
animationSpeed: 50,
animationEasing: 'swing',
change: null,
changeDelay: 0,
control: 'hue',
hide: null,
hideSpeed: 100,
inline: false,
letterCase: 'lowercase',
opacity: false,
show: null,
showSpeed: 100
};

this.$get = function() {
return this;
};

});

angular.module('minicolors').directive('minicolors', ['minicolors', '$timeout', function (minicolors, $timeout) {
return {
require: '?ngModel',
restrict: 'A',
priority: 1, //since we bind on an input element, we have to set a higher priority than angular-default input
link: function(scope, element, attrs, ngModel) {

var inititalized = false;

//gets the settings object
var getSettings = function () {
var config = angular.extend({}, minicolors.defaults, scope.$eval(attrs.minicolors));
return config;
};

//what to do if the value changed
ngModel.$render = function () {

//we are in digest or apply, and therefore call a timeout function
$timeout(function() {
var color = ngModel.$viewValue;
element.minicolors('value', color);
}, 0, false);
};

//init method
var initMinicolors = function () {

if(!ngModel) {
return;
}
var settings = getSettings();
settings.change = function (hex) {
scope.$apply(function () {
ngModel.$setViewValue(hex);
});
};

//destroy the old colorpicker if one already exists
if(element.hasClass('minicolors-input')) {
element.minicolors('destroy');
}

// Create the new minicolors widget
element.minicolors(settings);

// are we inititalized yet ?
//needs to be wrapped in $timeout, to prevent $apply / $digest errors
//$scope.$apply will be called by $timeout, so we don't have to handle that case
if (!inititalized) {
$timeout(function() {
var color = ngModel.$viewValue;
element.minicolors('value', color);
}, 0);
inititalized = true;
return;
}
};

initMinicolors();
//initital call

// Watch for changes to the directives options and then call init method again
scope.$watch(getSettings, initMinicolors, true);
}
};
}]);
Loading