Polyfill Promise. Fixes #2375
This commit is contained in:
Generated
+8
-10
@@ -262,8 +262,7 @@
|
|||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz",
|
||||||
"integrity": "sha1-UidltQw1EEkOUtfc/ghe+bqWlY8=",
|
"integrity": "sha1-UidltQw1EEkOUtfc/ghe+bqWlY8=",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"asn1": {
|
"asn1": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
@@ -5970,11 +5969,10 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"promise": {
|
"promise": {
|
||||||
"version": "7.3.0",
|
"version": "7.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
|
||||||
"integrity": "sha512-bzAZ0u9Kxa0FYyfISjr9/PK7sCclAzc5rP4UgynMWA2Qv/gpZLKynJmTEXYq2i/giYdjBfRONDhfbsMlGIgvjA==",
|
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true
|
|
||||||
},
|
},
|
||||||
"proto-list": {
|
"proto-list": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
@@ -7271,9 +7269,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sweetalert2": {
|
"sweetalert2": {
|
||||||
"version": "6.6.5",
|
"version": "6.6.6",
|
||||||
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-6.6.5.tgz",
|
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-6.6.6.tgz",
|
||||||
"integrity": "sha1-///BBkcR/3hwvIrv4WePlezCkNs=",
|
"integrity": "sha1-NjAnnZjwT7i4ny6LCY/ELwO8tVU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tapable": {
|
"tapable": {
|
||||||
|
|||||||
+2
-1
@@ -28,8 +28,9 @@
|
|||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"messenger": "git+https://github.com/HubSpot/messenger.git",
|
"messenger": "git+https://github.com/HubSpot/messenger.git",
|
||||||
"moment": "^2.17.1",
|
"moment": "^2.17.1",
|
||||||
|
"promise": "^7.3.1",
|
||||||
"sortablejs": "^1.5.1",
|
"sortablejs": "^1.5.1",
|
||||||
"sweetalert2": "^6.4.4"
|
"sweetalert2": "^6.6.6"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"/dist/css/app.feac6a0c1283b11117bc898e9697488a.css","sources":[],"mappings":";;;;;;;;;;A","sourceRoot":""}
|
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"/dist/css/dashboard/dashboard.d62a8b6468ab8c9bca396ab8f6cde506.css","sources":[],"mappings":";;;;;;;;;;;;;;A","sourceRoot":""}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
@@ -1,15 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
"/dist/js/app.js": "/dist/js/app.f266b3ff7582a248cf69.js",
|
||||||
"/mix.js": "/mix.46bdcf356e69eb1117ec.js",
|
"/mix.js": "/mix.46bdcf356e69eb1117ec.js",
|
||||||
"/js/app.js": "/js/app.js",
|
"/dist/css/dashboard/dashboard.css": "/dist/css/dashboard/dashboard.b475b26f586c0747452d537bdf88aec4.css",
|
||||||
"/js/all.js": "/js/all.96fbf298e0087299ee7bd00e57d3bcc1.js",
|
|
||||||
"/css/dashboard/dashboard.css": "/css/dashboard/dashboard.d62a8b6468ab8c9bca396ab8f6cde506.css",
|
|
||||||
"/css/app.css": "/css/app.feac6a0c1283b11117bc898e9697488a.css",
|
|
||||||
"/mix.js.map": "/mix.46bdcf356e69eb1117ec.js.map",
|
|
||||||
"/css/dashboard/dashboard.css.map": "/css/dashboard/dashboard.d62a8b6468ab8c9bca396ab8f6cde506.css.map",
|
|
||||||
"/css/app.css.map": "/css/app.feac6a0c1283b11117bc898e9697488a.css.map",
|
|
||||||
"/dist/css/dashboard/dashboard.css": "/dist/css/dashboard/dashboard.d62a8b6468ab8c9bca396ab8f6cde506.css",
|
|
||||||
"/dist/css/app.css": "/dist/css/app.feac6a0c1283b11117bc898e9697488a.css",
|
"/dist/css/app.css": "/dist/css/app.feac6a0c1283b11117bc898e9697488a.css",
|
||||||
"/dist/css/dashboard/dashboard.css.map": "/dist/css/dashboard/dashboard.d62a8b6468ab8c9bca396ab8f6cde506.css.map",
|
"/dist/js/all.js": "/dist/js/all.7086017b336c8e35b8de419383fbdc12.js"
|
||||||
"/dist/css/app.css.map": "/dist/css/app.feac6a0c1283b11117bc898e9697488a.css.map",
|
|
||||||
"/dist/js/all.js": "/dist/js/all.96fbf298e0087299ee7bd00e57d3bcc1.js"
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
!function(n){function t(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return n[e].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=n,t.c=r,t.i=function(n){return n},t.d=function(n,r,e){t.o(n,r)||Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:e})},t.n=function(n){var r=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(r,"a",r),r},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=0)}({0:function(n,t,r){r("qRWl"),r("9GM1"),n.exports=r("xZZD")},"9GM1":function(n,t){},qRWl:function(n,t){},xZZD:function(n,t){}});
|
||||||
+1
-407
@@ -1,407 +1 @@
|
|||||||
$(function() {
|
var Promise = require('promise')
|
||||||
// Ajax Setup
|
|
||||||
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
|
|
||||||
var token;
|
|
||||||
if (! options.crossDomain) {
|
|
||||||
token = $('meta[name="token"]').attr('content');
|
|
||||||
if (token) {
|
|
||||||
jqXHR.setRequestHeader('X-CSRF-Token', token);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return jqXHR;
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajaxSetup({
|
|
||||||
beforeSend: function (xhr) {
|
|
||||||
xhr.setRequestHeader('Accept', 'application/json');
|
|
||||||
// xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
|
|
||||||
},
|
|
||||||
statusCode: {
|
|
||||||
401: function () {
|
|
||||||
window.location.href = '/';
|
|
||||||
},
|
|
||||||
403: function () {
|
|
||||||
window.location.href = '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Prevent double form submission
|
|
||||||
$('form').submit(function() {
|
|
||||||
var $form = $(this);
|
|
||||||
$form.find(':submit').prop('disabled', true);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Autosizing of textareas.
|
|
||||||
// autosize($('textarea.autosize'));
|
|
||||||
|
|
||||||
// Mock the DELETE form requests.
|
|
||||||
$('[data-method]').not(".disabled").append(function() {
|
|
||||||
var methodForm = "\n";
|
|
||||||
methodForm += "<form action='" + $(this).attr('href') + "' method='POST' style='display:none'>\n";
|
|
||||||
methodForm += "<input type='hidden' name='_method' value='" + $(this).attr('data-method') + "'>\n";
|
|
||||||
methodForm += "<input type='hidden' name='_token' value='" + $('meta[name=token]').attr('content') + "'>\n";
|
|
||||||
methodForm += "</form>\n";
|
|
||||||
return methodForm;
|
|
||||||
})
|
|
||||||
.removeAttr('href')
|
|
||||||
.on('click', function() {
|
|
||||||
var button = $(this);
|
|
||||||
|
|
||||||
if (button.hasClass('confirm-action')) {
|
|
||||||
askConfirmation(function() {
|
|
||||||
button.find("form").submit();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
button.find("form").submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Messenger config
|
|
||||||
Messenger.options = {
|
|
||||||
extraClasses: 'messenger-fixed messenger-on-top',
|
|
||||||
theme: 'air'
|
|
||||||
};
|
|
||||||
|
|
||||||
// App setup
|
|
||||||
window.Cachet = {};
|
|
||||||
|
|
||||||
moment.locale(Global.locale);
|
|
||||||
|
|
||||||
$('abbr.timeago').each(function () {
|
|
||||||
var $el = $(this);
|
|
||||||
$el
|
|
||||||
.livestamp($el.data('timeago'))
|
|
||||||
.tooltip();
|
|
||||||
});
|
|
||||||
|
|
||||||
window.Cachet.Notifier = function () {
|
|
||||||
this.notify = function (message, type, options) {
|
|
||||||
if (_.isPlainObject(message)) {
|
|
||||||
message = message.detail;
|
|
||||||
}
|
|
||||||
type = (typeof type === 'undefined' || type === 'error') ? 'error' : type;
|
|
||||||
|
|
||||||
var defaultOptions = {
|
|
||||||
message: message,
|
|
||||||
type: type,
|
|
||||||
showCloseButton: true
|
|
||||||
};
|
|
||||||
|
|
||||||
options = _.extend(defaultOptions, options);
|
|
||||||
|
|
||||||
Messenger().post(options);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
$(".sidebar-toggler").click(function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
$(".wrapper").toggleClass("toggled");
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.color-code').minicolors({
|
|
||||||
control: 'hue',
|
|
||||||
defaultValue: $(this).val() || '',
|
|
||||||
inline: false,
|
|
||||||
letterCase: 'lowercase',
|
|
||||||
opacity: false,
|
|
||||||
position: 'bottom left',
|
|
||||||
theme: 'bootstrap'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
|
||||||
|
|
||||||
$('button.close').on('click', function() {
|
|
||||||
$(this).parents('div.alert').addClass('hide');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('form[name=IncidentForm] select[name=component_id]').on('change', function() {
|
|
||||||
var $option = $(this).find('option:selected');
|
|
||||||
var $componentStatus = $('#component-status');
|
|
||||||
|
|
||||||
if (parseInt($option.val(), 10) !== 0) {
|
|
||||||
if ($componentStatus.hasClass('hidden')) {
|
|
||||||
$componentStatus.removeClass('hidden');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$componentStatus.addClass('hidden');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Date picker.
|
|
||||||
$('input[rel=datepicker]').datetimepicker({
|
|
||||||
format: "DD/MM/YYYY HH:mm",
|
|
||||||
minDate: new Date(), // Don't allow dates before today.
|
|
||||||
sideBySide: true,
|
|
||||||
icons: {
|
|
||||||
time: 'ion-clock',
|
|
||||||
date: 'ion-android-calendar',
|
|
||||||
up: 'ion-ios-arrow-up',
|
|
||||||
down: 'ion-ios-arrow-down',
|
|
||||||
previous: 'ion-ios-arrow-left',
|
|
||||||
next: 'ion-ios-arrow-right',
|
|
||||||
today: 'ion-android-home',
|
|
||||||
clear: 'ion-trash-a',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('input[rel=datepicker-any]').datetimepicker({
|
|
||||||
format: "DD/MM/YYYY HH:mm",
|
|
||||||
sideBySide: true,
|
|
||||||
icons: {
|
|
||||||
time: 'ion-clock',
|
|
||||||
date: 'ion-android-calendar',
|
|
||||||
up: 'ion-ios-arrow-up',
|
|
||||||
down: 'ion-ios-arrow-down',
|
|
||||||
previous: 'ion-ios-arrow-left',
|
|
||||||
next: 'ion-ios-arrow-right',
|
|
||||||
today: 'ion-android-home',
|
|
||||||
clear: 'ion-trash-a',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('input[rel=datepicker-custom]').datetimepicker({
|
|
||||||
sideBySide: true,
|
|
||||||
icons: {
|
|
||||||
time: 'ion-clock',
|
|
||||||
date: 'ion-android-calendar',
|
|
||||||
up: 'ion-ios-arrow-up',
|
|
||||||
down: 'ion-ios-arrow-down',
|
|
||||||
previous: 'ion-ios-arrow-left',
|
|
||||||
next: 'ion-ios-arrow-right',
|
|
||||||
today: 'ion-android-home',
|
|
||||||
clear: 'ion-trash-a',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sortable models.
|
|
||||||
var orderableLists = document.querySelectorAll('[data-orderable-list]');
|
|
||||||
|
|
||||||
$.each(orderableLists, function (k, list) {
|
|
||||||
var url = $(list).data('orderableList');
|
|
||||||
var notifier = new Cachet.Notifier();
|
|
||||||
|
|
||||||
new Sortable(list, {
|
|
||||||
group: 'omega',
|
|
||||||
handle: '.drag-handle',
|
|
||||||
onUpdate: function() {
|
|
||||||
var orderedIds = $.map(list.querySelectorAll('[data-orderable-id]'), function(elem) {
|
|
||||||
return $(elem).data('orderable-id');
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
async: true,
|
|
||||||
url: url,
|
|
||||||
type: 'POST',
|
|
||||||
data: {
|
|
||||||
ids: orderedIds
|
|
||||||
},
|
|
||||||
success: function() {
|
|
||||||
notifier.notify('Ordering updated.', 'success');
|
|
||||||
},
|
|
||||||
error: function() {
|
|
||||||
notifier.notify('Ordering not updated.', 'error');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Toggle inline component statuses.
|
|
||||||
$('form.component-inline').on('click', 'input[type=radio]', function() {
|
|
||||||
var $form = $(this).parents('form');
|
|
||||||
var formData = $form.serializeObject();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
async: true,
|
|
||||||
url: '/dashboard/api/components/' + formData.component_id,
|
|
||||||
type: 'POST',
|
|
||||||
data: formData,
|
|
||||||
success: function(component) {
|
|
||||||
(new Cachet.Notifier()).notify($form.data('messenger'), 'success');
|
|
||||||
},
|
|
||||||
error: function(a, b, c) {
|
|
||||||
(new Cachet.Notifier()).notify('Something went wrong updating the component.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Incident management
|
|
||||||
$('select[name=template]').on('change', function() {
|
|
||||||
var $this = $(this).find('option:selected'),
|
|
||||||
slug = $this.val();
|
|
||||||
|
|
||||||
// Only fetch the template if we've picked one.
|
|
||||||
if (slug) {
|
|
||||||
$.ajax({
|
|
||||||
async: true,
|
|
||||||
data: {
|
|
||||||
slug: slug
|
|
||||||
},
|
|
||||||
url: '/dashboard/api/incidents/templates',
|
|
||||||
success: function(tpl) {
|
|
||||||
var $form = $('form[role=form]');
|
|
||||||
$form.find('input[name=name]').val(tpl.name);
|
|
||||||
$form.find('textarea[name=message]').val(tpl.template);
|
|
||||||
},
|
|
||||||
error: function() {
|
|
||||||
(new Cachet.Notifier()).notify('There was an error finding that template.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Banner removal JS
|
|
||||||
$('#remove-banner').click(function(){
|
|
||||||
$('#banner-view').remove();
|
|
||||||
$('input[name=remove_banner]').val('1');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.group-name').on('click', function () {
|
|
||||||
var $this = $(this);
|
|
||||||
|
|
||||||
$this.find('.group-toggle').toggleClass('ion-ios-minus-outline').toggleClass('ion-ios-plus-outline');
|
|
||||||
|
|
||||||
$this.next('.group-items').toggleClass('hide');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.select-group').on('click', function () {
|
|
||||||
var $parentGroup = $(this).closest('ul.list-group');
|
|
||||||
$parentGroup.find('input[type=checkbox]').prop('checked', true);
|
|
||||||
$parentGroup.find('.group-items').removeClass('hide')
|
|
||||||
$parentGroup.find('.group-toggle').addClass('ion-ios-minus-outline').removeClass('ion-ios-plus-outline');
|
|
||||||
event.stopPropagation();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.deselect-group').on('click', function () {
|
|
||||||
var $parentGroup = $(this).closest('ul.list-group');
|
|
||||||
$parentGroup.find('input[type=checkbox]').prop('checked', false);
|
|
||||||
$parentGroup.find('.group-items').addClass('hide');
|
|
||||||
$parentGroup.find('.group-toggle').removeClass('ion-ios-minus-outline').addClass('ion-ios-plus-outline');
|
|
||||||
event.stopPropagation();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Setup wizard
|
|
||||||
$('.wizard-next').on('click', function () {
|
|
||||||
var $form = $('#setup-form'),
|
|
||||||
$btn = $(this),
|
|
||||||
current = $btn.data('currentBlock'),
|
|
||||||
next = $btn.data('nextBlock');
|
|
||||||
|
|
||||||
$btn.button('loading');
|
|
||||||
|
|
||||||
// Only validate going forward. If current group is invalid, do not go further
|
|
||||||
if (next > current) {
|
|
||||||
var url = '/setup/step' + current;
|
|
||||||
$.post(url, $form.serializeObject())
|
|
||||||
.done(function(response) {
|
|
||||||
goToStep(current, next);
|
|
||||||
})
|
|
||||||
.fail(function(response) {
|
|
||||||
var errors = _.toArray(response.responseJSON.errors);
|
|
||||||
_.each(errors, function(error) {
|
|
||||||
(new Cachet.Notifier()).notify(error);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.always(function() {
|
|
||||||
$btn.button('reset');
|
|
||||||
});
|
|
||||||
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
goToStep(current, next);
|
|
||||||
$btn.button('reset');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sparkline
|
|
||||||
if ($.fn.sparkline) {
|
|
||||||
var sparkLine = function () {
|
|
||||||
$('.sparkline').each(function () {
|
|
||||||
var data = $(this).data();
|
|
||||||
data.valueSpots = {
|
|
||||||
'0:': data.spotColor
|
|
||||||
};
|
|
||||||
|
|
||||||
$(this).sparkline(data.data, data);
|
|
||||||
var composite = data.compositedata;
|
|
||||||
|
|
||||||
if (composite) {
|
|
||||||
var stlColor = $(this).attr("data-stack-line-color"),
|
|
||||||
stfColor = $(this).attr("data-stack-fill-color"),
|
|
||||||
sptColor = $(this).attr("data-stack-spot-color"),
|
|
||||||
sptRadius = $(this).attr("data-stack-spot-radius");
|
|
||||||
|
|
||||||
$(this).sparkline(composite, {
|
|
||||||
composite: true,
|
|
||||||
lineColor: stlColor,
|
|
||||||
fillColor: stfColor,
|
|
||||||
spotColor: sptColor,
|
|
||||||
highlightSpotColor: sptColor,
|
|
||||||
spotRadius: sptRadius,
|
|
||||||
valueSpots: {
|
|
||||||
'0:': sptColor
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
sparkLine(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
function goToStep(current, next) {
|
|
||||||
// validation was ok. We can go on next step.
|
|
||||||
$('.block-' + current)
|
|
||||||
.removeClass('show')
|
|
||||||
.addClass('hidden');
|
|
||||||
|
|
||||||
$('.block-' + next)
|
|
||||||
.removeClass('hidden')
|
|
||||||
.addClass('show');
|
|
||||||
|
|
||||||
$('.steps .step')
|
|
||||||
.removeClass("active")
|
|
||||||
.filter(":lt(" + (next) + ")")
|
|
||||||
.addClass("active");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Password strength
|
|
||||||
$('.password-strength').strengthify();
|
|
||||||
|
|
||||||
// Check for updates.
|
|
||||||
if ($('#update-alert').length > 0) {
|
|
||||||
$.ajax({
|
|
||||||
async: true,
|
|
||||||
dataType: 'json',
|
|
||||||
url: '/api/v1/version',
|
|
||||||
}).done(function (result) {
|
|
||||||
if (result.meta.on_latest === false) {
|
|
||||||
$('#update-alert').removeClass('hidden');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function askConfirmation(callback, cancelCallback) {
|
|
||||||
swal({
|
|
||||||
type: "warning",
|
|
||||||
title: "Confirm your action",
|
|
||||||
text: "Are you sure you want to do this?",
|
|
||||||
buttonsStyling: false,
|
|
||||||
reverseButtons: true,
|
|
||||||
confirmButtonText: "Yes",
|
|
||||||
confirmButtonClass: "btn btn-lg btn-danger",
|
|
||||||
cancelButtonClass: "btn btn-lg btn-default",
|
|
||||||
showCancelButton: true,
|
|
||||||
focusCancel: true
|
|
||||||
}).then(function () {
|
|
||||||
if (_.isFunction(callback)) callback();
|
|
||||||
}, function () {
|
|
||||||
if (_.isFunction(cancelCallback)) cancelCallback();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,406 @@
|
|||||||
|
(function() {
|
||||||
|
// Ajax Setup
|
||||||
|
$.ajaxPrefilter(function(options, originalOptions, jqXHR) {
|
||||||
|
var token;
|
||||||
|
if (! options.crossDomain) {
|
||||||
|
token = $('meta[name="token"]').attr('content');
|
||||||
|
if (token) {
|
||||||
|
jqXHR.setRequestHeader('X-CSRF-Token', token);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return jqXHR;
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajaxSetup({
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.setRequestHeader('Accept', 'application/json');
|
||||||
|
// xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
|
||||||
|
},
|
||||||
|
statusCode: {
|
||||||
|
401: function () {
|
||||||
|
window.location.href = '/';
|
||||||
|
},
|
||||||
|
403: function () {
|
||||||
|
window.location.href = '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Prevent double form submission
|
||||||
|
$('form').submit(function() {
|
||||||
|
var $form = $(this);
|
||||||
|
$form.find(':submit').prop('disabled', true);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Autosizing of textareas.
|
||||||
|
// autosize($('textarea.autosize'));
|
||||||
|
|
||||||
|
// Mock the DELETE form requests.
|
||||||
|
$('[data-method]').not(".disabled").append(function() {
|
||||||
|
var methodForm = "\n";
|
||||||
|
methodForm += "<form action='" + $(this).attr('href') + "' method='POST' style='display:none'>\n";
|
||||||
|
methodForm += "<input type='hidden' name='_method' value='" + $(this).attr('data-method') + "'>\n";
|
||||||
|
methodForm += "<input type='hidden' name='_token' value='" + $('meta[name=token]').attr('content') + "'>\n";
|
||||||
|
methodForm += "</form>\n";
|
||||||
|
return methodForm;
|
||||||
|
})
|
||||||
|
.removeAttr('href')
|
||||||
|
.on('click', function() {
|
||||||
|
var button = $(this);
|
||||||
|
|
||||||
|
if (button.hasClass('confirm-action')) {
|
||||||
|
askConfirmation(function() {
|
||||||
|
button.find("form").submit();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
button.find("form").submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Messenger config
|
||||||
|
Messenger.options = {
|
||||||
|
extraClasses: 'messenger-fixed messenger-on-top',
|
||||||
|
theme: 'air'
|
||||||
|
};
|
||||||
|
|
||||||
|
// App setup
|
||||||
|
window.Cachet = {};
|
||||||
|
|
||||||
|
moment.locale(Global.locale);
|
||||||
|
|
||||||
|
$('abbr.timeago').each(function () {
|
||||||
|
var $el = $(this);
|
||||||
|
$el
|
||||||
|
.livestamp($el.data('timeago'))
|
||||||
|
.tooltip();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.Cachet.Notifier = function () {
|
||||||
|
this.notify = function (message, type, options) {
|
||||||
|
if (_.isPlainObject(message)) {
|
||||||
|
message = message.detail;
|
||||||
|
}
|
||||||
|
type = (typeof type === 'undefined' || type === 'error') ? 'error' : type;
|
||||||
|
|
||||||
|
var defaultOptions = {
|
||||||
|
message: message,
|
||||||
|
type: type,
|
||||||
|
showCloseButton: true
|
||||||
|
};
|
||||||
|
|
||||||
|
options = _.extend(defaultOptions, options);
|
||||||
|
|
||||||
|
Messenger().post(options);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
$(".sidebar-toggler").click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$(".wrapper").toggleClass("toggled");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.color-code').minicolors({
|
||||||
|
control: 'hue',
|
||||||
|
defaultValue: $(this).val() || '',
|
||||||
|
inline: false,
|
||||||
|
letterCase: 'lowercase',
|
||||||
|
opacity: false,
|
||||||
|
position: 'bottom left',
|
||||||
|
theme: 'bootstrap'
|
||||||
|
});
|
||||||
|
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
|
$('button.close').on('click', function() {
|
||||||
|
$(this).parents('div.alert').addClass('hide');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('form[name=IncidentForm] select[name=component_id]').on('change', function() {
|
||||||
|
var $option = $(this).find('option:selected');
|
||||||
|
var $componentStatus = $('#component-status');
|
||||||
|
|
||||||
|
if (parseInt($option.val(), 10) !== 0) {
|
||||||
|
if ($componentStatus.hasClass('hidden')) {
|
||||||
|
$componentStatus.removeClass('hidden');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$componentStatus.addClass('hidden');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Date picker.
|
||||||
|
$('input[rel=datepicker]').datetimepicker({
|
||||||
|
format: "DD/MM/YYYY HH:mm",
|
||||||
|
minDate: new Date(), // Don't allow dates before today.
|
||||||
|
sideBySide: true,
|
||||||
|
icons: {
|
||||||
|
time: 'ion-clock',
|
||||||
|
date: 'ion-android-calendar',
|
||||||
|
up: 'ion-ios-arrow-up',
|
||||||
|
down: 'ion-ios-arrow-down',
|
||||||
|
previous: 'ion-ios-arrow-left',
|
||||||
|
next: 'ion-ios-arrow-right',
|
||||||
|
today: 'ion-android-home',
|
||||||
|
clear: 'ion-trash-a',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[rel=datepicker-any]').datetimepicker({
|
||||||
|
format: "DD/MM/YYYY HH:mm",
|
||||||
|
sideBySide: true,
|
||||||
|
icons: {
|
||||||
|
time: 'ion-clock',
|
||||||
|
date: 'ion-android-calendar',
|
||||||
|
up: 'ion-ios-arrow-up',
|
||||||
|
down: 'ion-ios-arrow-down',
|
||||||
|
previous: 'ion-ios-arrow-left',
|
||||||
|
next: 'ion-ios-arrow-right',
|
||||||
|
today: 'ion-android-home',
|
||||||
|
clear: 'ion-trash-a',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[rel=datepicker-custom]').datetimepicker({
|
||||||
|
sideBySide: true,
|
||||||
|
icons: {
|
||||||
|
time: 'ion-clock',
|
||||||
|
date: 'ion-android-calendar',
|
||||||
|
up: 'ion-ios-arrow-up',
|
||||||
|
down: 'ion-ios-arrow-down',
|
||||||
|
previous: 'ion-ios-arrow-left',
|
||||||
|
next: 'ion-ios-arrow-right',
|
||||||
|
today: 'ion-android-home',
|
||||||
|
clear: 'ion-trash-a',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sortable models.
|
||||||
|
var orderableLists = document.querySelectorAll('[data-orderable-list]');
|
||||||
|
|
||||||
|
$.each(orderableLists, function (k, list) {
|
||||||
|
var url = $(list).data('orderableList');
|
||||||
|
var notifier = new Cachet.Notifier();
|
||||||
|
|
||||||
|
new Sortable(list, {
|
||||||
|
group: 'omega',
|
||||||
|
handle: '.drag-handle',
|
||||||
|
onUpdate: function() {
|
||||||
|
var orderedIds = $.map(list.querySelectorAll('[data-orderable-id]'), function(elem) {
|
||||||
|
return $(elem).data('orderable-id');
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
async: true,
|
||||||
|
url: url,
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
ids: orderedIds
|
||||||
|
},
|
||||||
|
success: function() {
|
||||||
|
notifier.notify('Ordering updated.', 'success');
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
notifier.notify('Ordering not updated.', 'error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Toggle inline component statuses.
|
||||||
|
$('form.component-inline').on('click', 'input[type=radio]', function() {
|
||||||
|
var $form = $(this).parents('form');
|
||||||
|
var formData = $form.serializeObject();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
async: true,
|
||||||
|
url: '/dashboard/api/components/' + formData.component_id,
|
||||||
|
type: 'POST',
|
||||||
|
data: formData,
|
||||||
|
success: function(component) {
|
||||||
|
(new Cachet.Notifier()).notify($form.data('messenger'), 'success');
|
||||||
|
},
|
||||||
|
error: function(a, b, c) {
|
||||||
|
(new Cachet.Notifier()).notify('Something went wrong updating the component.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Incident management
|
||||||
|
$('select[name=template]').on('change', function() {
|
||||||
|
var $this = $(this).find('option:selected'),
|
||||||
|
slug = $this.val();
|
||||||
|
|
||||||
|
// Only fetch the template if we've picked one.
|
||||||
|
if (slug) {
|
||||||
|
$.ajax({
|
||||||
|
async: true,
|
||||||
|
data: {
|
||||||
|
slug: slug
|
||||||
|
},
|
||||||
|
url: '/dashboard/api/incidents/templates',
|
||||||
|
success: function(tpl) {
|
||||||
|
var $form = $('form[role=form]');
|
||||||
|
$form.find('input[name=name]').val(tpl.name);
|
||||||
|
$form.find('textarea[name=message]').val(tpl.template);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
(new Cachet.Notifier()).notify('There was an error finding that template.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Banner removal JS
|
||||||
|
$('#remove-banner').click(function(){
|
||||||
|
$('#banner-view').remove();
|
||||||
|
$('input[name=remove_banner]').val('1');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.group-name').on('click', function () {
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
$this.find('.group-toggle').toggleClass('ion-ios-minus-outline').toggleClass('ion-ios-plus-outline');
|
||||||
|
|
||||||
|
$this.next('.group-items').toggleClass('hide');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.select-group').on('click', function () {
|
||||||
|
var $parentGroup = $(this).closest('ul.list-group');
|
||||||
|
$parentGroup.find('input[type=checkbox]').prop('checked', true);
|
||||||
|
$parentGroup.find('.group-items').removeClass('hide')
|
||||||
|
$parentGroup.find('.group-toggle').addClass('ion-ios-minus-outline').removeClass('ion-ios-plus-outline');
|
||||||
|
event.stopPropagation();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.deselect-group').on('click', function () {
|
||||||
|
var $parentGroup = $(this).closest('ul.list-group');
|
||||||
|
$parentGroup.find('input[type=checkbox]').prop('checked', false);
|
||||||
|
$parentGroup.find('.group-items').addClass('hide');
|
||||||
|
$parentGroup.find('.group-toggle').removeClass('ion-ios-minus-outline').addClass('ion-ios-plus-outline');
|
||||||
|
event.stopPropagation();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Setup wizard
|
||||||
|
$('.wizard-next').on('click', function () {
|
||||||
|
var $form = $('#setup-form'),
|
||||||
|
$btn = $(this),
|
||||||
|
current = $btn.data('currentBlock'),
|
||||||
|
next = $btn.data('nextBlock');
|
||||||
|
|
||||||
|
$btn.button('loading');
|
||||||
|
|
||||||
|
// Only validate going forward. If current group is invalid, do not go further
|
||||||
|
if (next > current) {
|
||||||
|
var url = '/setup/step' + current;
|
||||||
|
$.post(url, $form.serializeObject())
|
||||||
|
.done(function(response) {
|
||||||
|
goToStep(current, next);
|
||||||
|
})
|
||||||
|
.fail(function(response) {
|
||||||
|
var errors = _.toArray(response.responseJSON.errors);
|
||||||
|
_.each(errors, function(error) {
|
||||||
|
(new Cachet.Notifier()).notify(error);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.always(function() {
|
||||||
|
$btn.button('reset');
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
goToStep(current, next);
|
||||||
|
$btn.button('reset');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sparkline
|
||||||
|
if ($.fn.sparkline) {
|
||||||
|
var sparkLine = function () {
|
||||||
|
$('.sparkline').each(function () {
|
||||||
|
var data = $(this).data();
|
||||||
|
data.valueSpots = {
|
||||||
|
'0:': data.spotColor
|
||||||
|
};
|
||||||
|
|
||||||
|
$(this).sparkline(data.data, data);
|
||||||
|
var composite = data.compositedata;
|
||||||
|
|
||||||
|
if (composite) {
|
||||||
|
var stlColor = $(this).attr("data-stack-line-color"),
|
||||||
|
stfColor = $(this).attr("data-stack-fill-color"),
|
||||||
|
sptColor = $(this).attr("data-stack-spot-color"),
|
||||||
|
sptRadius = $(this).attr("data-stack-spot-radius");
|
||||||
|
|
||||||
|
$(this).sparkline(composite, {
|
||||||
|
composite: true,
|
||||||
|
lineColor: stlColor,
|
||||||
|
fillColor: stfColor,
|
||||||
|
spotColor: sptColor,
|
||||||
|
highlightSpotColor: sptColor,
|
||||||
|
spotRadius: sptRadius,
|
||||||
|
valueSpots: {
|
||||||
|
'0:': sptColor
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
sparkLine(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function goToStep(current, next) {
|
||||||
|
// validation was ok. We can go on next step.
|
||||||
|
$('.block-' + current)
|
||||||
|
.removeClass('show')
|
||||||
|
.addClass('hidden');
|
||||||
|
|
||||||
|
$('.block-' + next)
|
||||||
|
.removeClass('hidden')
|
||||||
|
.addClass('show');
|
||||||
|
|
||||||
|
$('.steps .step')
|
||||||
|
.removeClass("active")
|
||||||
|
.filter(":lt(" + (next) + ")")
|
||||||
|
.addClass("active");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Password strength
|
||||||
|
$('.password-strength').strengthify();
|
||||||
|
|
||||||
|
// Check for updates.
|
||||||
|
if ($('#update-alert').length > 0) {
|
||||||
|
$.ajax({
|
||||||
|
async: true,
|
||||||
|
dataType: 'json',
|
||||||
|
url: '/api/v1/version',
|
||||||
|
}).done(function (result) {
|
||||||
|
if (result.meta.on_latest === false) {
|
||||||
|
$('#update-alert').removeClass('hidden');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function askConfirmation(callback, cancelCallback) {
|
||||||
|
swal({
|
||||||
|
type: "warning",
|
||||||
|
title: "Confirm your action",
|
||||||
|
text: "Are you sure you want to do this?",
|
||||||
|
buttonsStyling: false,
|
||||||
|
reverseButtons: true,
|
||||||
|
confirmButtonText: "Yes",
|
||||||
|
confirmButtonClass: "btn btn-lg btn-danger",
|
||||||
|
cancelButtonClass: "btn btn-lg btn-default",
|
||||||
|
showCancelButton: true,
|
||||||
|
focusCancel: true
|
||||||
|
}).then(function () {
|
||||||
|
if (_.isFunction(callback)) callback();
|
||||||
|
}, function () {
|
||||||
|
if (_.isFunction(cancelCallback)) cancelCallback();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}());
|
||||||
+96
-115
@@ -7,38 +7,38 @@
|
|||||||
-ms-text-size-adjust: 100%;
|
-ms-text-size-adjust: 100%;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #24292e;
|
color: #333;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-c {
|
.markdown-body .pl-c {
|
||||||
color: #6a737d;
|
color: #969896;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-c1,
|
.markdown-body .pl-c1,
|
||||||
.markdown-body .pl-s .pl-v {
|
.markdown-body .pl-s .pl-v {
|
||||||
color: #005cc5;
|
color: #0086b3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-e,
|
.markdown-body .pl-e,
|
||||||
.markdown-body .pl-en {
|
.markdown-body .pl-en {
|
||||||
color: #6f42c1;
|
color: #795da3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-smi,
|
.markdown-body .pl-smi,
|
||||||
.markdown-body .pl-s .pl-s1 {
|
.markdown-body .pl-s .pl-s1 {
|
||||||
color: #24292e;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-ent {
|
.markdown-body .pl-ent {
|
||||||
color: #22863a;
|
color: #63a35c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-k {
|
.markdown-body .pl-k {
|
||||||
color: #d73a49;
|
color: #a71d5d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-s,
|
.markdown-body .pl-s,
|
||||||
@@ -48,94 +48,69 @@
|
|||||||
.markdown-body .pl-sr .pl-cce,
|
.markdown-body .pl-sr .pl-cce,
|
||||||
.markdown-body .pl-sr .pl-sre,
|
.markdown-body .pl-sr .pl-sre,
|
||||||
.markdown-body .pl-sr .pl-sra {
|
.markdown-body .pl-sr .pl-sra {
|
||||||
color: #032f62;
|
color: #183691;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-v,
|
.markdown-body .pl-v {
|
||||||
.markdown-body .pl-smw {
|
color: #ed6a43;
|
||||||
color: #e36209;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-bu {
|
.markdown-body .pl-id {
|
||||||
color: #b31d28;
|
color: #b52a1d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-ii {
|
.markdown-body .pl-ii {
|
||||||
color: #fafbfc;
|
color: #f8f8f8;
|
||||||
background-color: #b31d28;
|
background-color: #b52a1d;
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-c2 {
|
|
||||||
color: #fafbfc;
|
|
||||||
background-color: #d73a49;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-c2::before {
|
|
||||||
content: "^M";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-sr .pl-cce {
|
.markdown-body .pl-sr .pl-cce {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #22863a;
|
color: #63a35c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-ml {
|
.markdown-body .pl-ml {
|
||||||
color: #735c0f;
|
color: #693a17;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-mh,
|
.markdown-body .pl-mh,
|
||||||
.markdown-body .pl-mh .pl-en,
|
.markdown-body .pl-mh .pl-en,
|
||||||
.markdown-body .pl-ms {
|
.markdown-body .pl-ms {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #005cc5;
|
color: #1d3e81;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-mq {
|
||||||
|
color: #008080;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-mi {
|
.markdown-body .pl-mi {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
color: #24292e;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-mb {
|
.markdown-body .pl-mb {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #24292e;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-md {
|
.markdown-body .pl-md {
|
||||||
color: #b31d28;
|
color: #bd2c00;
|
||||||
background-color: #ffeef0;
|
background-color: #ffecec;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-mi1 {
|
.markdown-body .pl-mi1 {
|
||||||
color: #22863a;
|
color: #55a532;
|
||||||
background-color: #f0fff4;
|
background-color: #eaffea;
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-mc {
|
|
||||||
color: #e36209;
|
|
||||||
background-color: #ffebda;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-mi2 {
|
|
||||||
color: #f6f8fa;
|
|
||||||
background-color: #005cc5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-mdr {
|
.markdown-body .pl-mdr {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #6f42c1;
|
color: #795da3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-ba {
|
.markdown-body .pl-mo {
|
||||||
color: #586069;
|
color: #1d3e81;
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-sg {
|
|
||||||
color: #959da5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-corl {
|
|
||||||
text-decoration: underline;
|
|
||||||
color: #032f62;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .octicon {
|
.markdown-body .octicon {
|
||||||
@@ -213,11 +188,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body a {
|
.markdown-body a {
|
||||||
color: #0366d6;
|
color: #4078c0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body a:hover {
|
.markdown-body a:hover,
|
||||||
|
.markdown-body a:active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +207,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-bottom: 1px solid #dfe2e5;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body hr::before {
|
.markdown-body hr::before {
|
||||||
@@ -328,46 +304,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body code {
|
.markdown-body code {
|
||||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body pre {
|
.markdown-body pre {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
font: 12px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .octicon {
|
.markdown-body .octicon {
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .pl-0 {
|
.markdown-body input {
|
||||||
padding-left: 0 !important;
|
-webkit-font-feature-settings: "liga" 0;
|
||||||
}
|
font-feature-settings: "liga" 0;
|
||||||
|
|
||||||
.markdown-body .pl-1 {
|
|
||||||
padding-left: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-2 {
|
|
||||||
padding-left: 8px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-3 {
|
|
||||||
padding-left: 16px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-4 {
|
|
||||||
padding-left: 24px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-5 {
|
|
||||||
padding-left: 32px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markdown-body .pl-6 {
|
|
||||||
padding-left: 40px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body::before {
|
.markdown-body::before {
|
||||||
@@ -420,14 +373,14 @@
|
|||||||
height: 0.25em;
|
height: 0.25em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 24px 0;
|
margin: 24px 0;
|
||||||
background-color: #e1e4e8;
|
background-color: #e7e7e7;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body blockquote {
|
.markdown-body blockquote {
|
||||||
padding: 0 1em;
|
padding: 0 1em;
|
||||||
color: #6a737d;
|
color: #777;
|
||||||
border-left: 0.25em solid #dfe2e5;
|
border-left: 0.25em solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body blockquote>:first-child {
|
.markdown-body blockquote>:first-child {
|
||||||
@@ -443,13 +396,13 @@
|
|||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
color: #444d56;
|
color: #555;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: #fafbfc;
|
background-color: #fcfcfc;
|
||||||
border: solid 1px #c6cbd1;
|
border: solid 1px #ccc;
|
||||||
border-bottom-color: #959da5;
|
border-bottom-color: #bbb;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: inset 0 -1px 0 #959da5;
|
box-shadow: inset 0 -1px 0 #bbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body h1,
|
.markdown-body h1,
|
||||||
@@ -470,7 +423,7 @@
|
|||||||
.markdown-body h4 .octicon-link,
|
.markdown-body h4 .octicon-link,
|
||||||
.markdown-body h5 .octicon-link,
|
.markdown-body h5 .octicon-link,
|
||||||
.markdown-body h6 .octicon-link {
|
.markdown-body h6 .octicon-link {
|
||||||
color: #1b1f23;
|
color: #000;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
@@ -496,13 +449,13 @@
|
|||||||
.markdown-body h1 {
|
.markdown-body h1 {
|
||||||
padding-bottom: 0.3em;
|
padding-bottom: 0.3em;
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
border-bottom: 1px solid #eaecef;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body h2 {
|
.markdown-body h2 {
|
||||||
padding-bottom: 0.3em;
|
padding-bottom: 0.3em;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
border-bottom: 1px solid #eaecef;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body h3 {
|
.markdown-body h3 {
|
||||||
@@ -519,7 +472,7 @@
|
|||||||
|
|
||||||
.markdown-body h6 {
|
.markdown-body h6 {
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
color: #6a737d;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body ul,
|
.markdown-body ul,
|
||||||
@@ -552,7 +505,7 @@
|
|||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body dl dd {
|
.markdown-body dl dd {
|
||||||
@@ -567,22 +520,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body table th {
|
.markdown-body table th {
|
||||||
font-weight: 600;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body table th,
|
.markdown-body table th,
|
||||||
.markdown-body table td {
|
.markdown-body table td {
|
||||||
padding: 6px 13px;
|
padding: 6px 13px;
|
||||||
border: 1px solid #dfe2e5;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body table tr {
|
.markdown-body table tr {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-top: 1px solid #c6cbd1;
|
border-top: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body table tr:nth-child(2n) {
|
.markdown-body table tr:nth-child(2n) {
|
||||||
background-color: #f6f8fa;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body img {
|
.markdown-body img {
|
||||||
@@ -597,7 +550,7 @@
|
|||||||
padding-bottom: 0.2em;
|
padding-bottom: 0.2em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
background-color: rgba(27,31,35,0.05);
|
background-color: rgba(0,0,0,0.04);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -636,7 +589,7 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
background-color: #f6f8fa;
|
background-color: #f7f7f7;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -657,29 +610,57 @@
|
|||||||
content: normal;
|
content: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-0 {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-1 {
|
||||||
|
padding-left: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-2 {
|
||||||
|
padding-left: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-3 {
|
||||||
|
padding-left: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-4 {
|
||||||
|
padding-left: 24px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-5 {
|
||||||
|
padding-left: 36px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown-body .pl-6 {
|
||||||
|
padding-left: 48px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.markdown-body .full-commit .btn-outline:not(:disabled):hover {
|
.markdown-body .full-commit .btn-outline:not(:disabled):hover {
|
||||||
color: #005cc5;
|
color: #4078c0;
|
||||||
border-color: #005cc5;
|
border: 1px solid #4078c0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body kbd {
|
.markdown-body kbd {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
color: #444d56;
|
color: #555;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: #fafbfc;
|
background-color: #fcfcfc;
|
||||||
border: solid 1px #d1d5da;
|
border: solid 1px #ccc;
|
||||||
border-bottom-color: #c6cbd1;
|
border-bottom-color: #bbb;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: inset 0 -1px 0 #c6cbd1;
|
box-shadow: inset 0 -1px 0 #bbb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body :checked+.radio-label {
|
.markdown-body :checked+.radio-label {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
border-color: #0366d6;
|
border-color: #4078c0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body .task-list-item {
|
.markdown-body .task-list-item {
|
||||||
|
|||||||
+3
-1
@@ -26,7 +26,9 @@ mix
|
|||||||
.options({
|
.options({
|
||||||
processCssUrls: false
|
processCssUrls: false
|
||||||
})
|
})
|
||||||
|
.js('resources/assets/js/app.js', 'public/dist/js')
|
||||||
.scripts([
|
.scripts([
|
||||||
|
'public/dist/js/app.js',
|
||||||
'node_modules/es5-shim/es5-shim.js',
|
'node_modules/es5-shim/es5-shim.js',
|
||||||
'node_modules/es5-shim/es5-sham.js',
|
'node_modules/es5-shim/es5-sham.js',
|
||||||
'node_modules/jquery/dist/jquery.min.js',
|
'node_modules/jquery/dist/jquery.min.js',
|
||||||
@@ -44,7 +46,7 @@ mix
|
|||||||
'node_modules/livestamp/livestamp.js',
|
'node_modules/livestamp/livestamp.js',
|
||||||
'node_modules/jquery-serializeobject/jquery.serializeObject.js',
|
'node_modules/jquery-serializeobject/jquery.serializeObject.js',
|
||||||
'resources/assets/js/password-strength.js',
|
'resources/assets/js/password-strength.js',
|
||||||
'resources/assets/js/app.js',
|
'resources/assets/js/cachet.js',
|
||||||
], 'public/dist/js/all.js')
|
], 'public/dist/js/all.js')
|
||||||
|
|
||||||
if (mix.config.inProduction) {
|
if (mix.config.inProduction) {
|
||||||
|
|||||||
Reference in New Issue
Block a user