Added Architect UI

This commit is contained in:
Deon George 2020-09-06 09:46:27 +10:00
parent e89b4d3287
commit 130ae005a3
36 changed files with 6454 additions and 286 deletions

View File

@ -48,7 +48,7 @@ class LoginController extends Controller
if (file_exists('login_note.txt'))
$login_note = file_get_contents('login_note.txt');
return view('adminlte::auth.login')->with('login_note',$login_note);
return view('architect::auth.login')->with('login_note',$login_note);
}
/**

View File

@ -23,6 +23,6 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
//
$this->loadViewsFrom(__DIR__.'/../../resources/themes/architect/views/','architect');
}
}

View File

@ -5,17 +5,25 @@
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19",
"cross-env": "^7.0",
"cross-env": "^5.2.1",
"laravel-mix": "^5.0.1",
"lodash": "^4.17.19",
"resolve-url-loader": "^3.1.0",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^8.0.0"
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.11"
},
"dependencies": {
"axios": "^0.19",
"bootstrap": "^4.2.1",
"jquery": "^3.5.1",
"laravel-echo": "^1.6.1",
"lodash": "^4.17.13",
"popper.js": "^1.16.0",
"pusher-js": "^5.0.3"
}
}

File diff suppressed because one or more lines are too long

6
public/css/app.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 893 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

45
public/css/fixes.css vendored
View File

@ -58,3 +58,48 @@ table.dataTable thead .sorting {
body {
font-size: 0.85em;
}
/** Remove the border around the tree **/
ul.fancytree-container {
border: 0px;
}
/** Remove the Cyan vertical line from the tree **/
.vertical-nav-menu #tree ul:before {
opacity: 0;
}
/** Tree Icon Placement **/
#tree > ul {
padding-left: 0px;
}
.closed-sidebar #tree {
display: none;
}
.closed-sidebar:hover .app-sidebar:hover #tree, .sidebar-mobile-open #tree {
display: block;
}
.app-sidebar #treeicon, .closed-sidebar:hover .app-sidebar:hover #treeicon, .sidebar-mobile-open #treeicon {
display: none;
}
.closed-sidebar .app-sidebar #treeicon {
display: initial;
position: relative;
}
/** Fix position of tree expander and checkbox */
span.fancytree-checkbox, span.fancytree-custom-icon, span.fancytree-expander, span.fancytree-icon {
margin-top: 4px;
}
ul.fancytree-container ul {
padding: 0 0 0 20px;
}
/** Fix elipse icon (top right) on small display */
.closed-sidebar .app-header.header-text-light .app-header__menu .mobile-toggle-header-nav {
background: #343a40;
}
/** Fix tree rendering **/
.fancytree-node {
line-height: 1.75em;
}
/** Dont render when hoving on the tree **/
.vertical-nav-menu li a.no-hover:hover {
background: #ffffff;
}

BIN
public/img/logo-h-lg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

50
public/js/custom.js vendored Normal file
View File

@ -0,0 +1,50 @@
function expandChildren(node) {
if (node.data.autoExpand && !node.isExpanded()) {
node.setExpanded(true);
}
if (node.children && node.children.length > 0) {
try {
node.children.forEach(expandChildren);
} catch (error) {
}
}
}
$(document).ready(function() {
// Attach the fancytree widget to an existing <div id="tree"> element
// and pass the tree options as an argument to the fancytree() function:
$('#tree').fancytree({
clickFolderMode: 3,
extensions: ['glyph'],
autoCollapse: true, // Automatically collapse all siblings, when a node is expanded.
autoScroll: true, // Automatically scroll nodes into visible area.
focusOnSelect: true, // Set focus when node is checked by a mouse click
click: function(event, data) {
if (data.targetType == 'title')
return false;
},
init: function(event, data) {
expandChildren(data.tree.rootNode);
},
source: {
url: "api/bases"
},
lazyLoad: function(event,data) {
data.result = {
url: "api/query",
data: {key: data.node.data.item,depth: 1}
};
expandChildren(data.tree.rootNode);
},
keydown: function(event, data){
switch( $.ui.fancytree.eventToString(data.originalEvent) ) {
case "return":
case "space":
data.node.toggleExpanded();
break;
}
}
});
});

View File

@ -1,3 +1,4 @@
window.$ = window.jQuery = require('jquery');
window._ = require('lodash');
/**
@ -16,13 +17,19 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo';
import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js');
/*
window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
wsHost: window.location.hostname,
wsPort: 6001,
disableStats: true,
useTLS: false,
});
*/
//require('bootstrap');

777
resources/js/bootstrap3-typeahead.js vendored Normal file
View File

@ -0,0 +1,777 @@
/* =============================================================
* bootstrap3-typeahead.js v4.0.2
* https://github.com/bassjobsen/Bootstrap-3-Typeahead
* =============================================================
* Original written by @mdo and @fat
* =============================================================
* Copyright 2014 Bass Jobsen @bassjobsen
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
(function (root, factory) {
'use strict';
// CommonJS module is defined
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('jquery'));
}
// AMD module is defined
else if (typeof define === 'function' && define.amd) {
define(['jquery'], function ($) {
return factory($);
});
} else {
factory(root.jQuery);
}
}(this, function ($) {
'use strict';
// jshint laxcomma: true
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element);
this.options = $.extend({}, Typeahead.defaults, options);
this.matcher = this.options.matcher || this.matcher;
this.sorter = this.options.sorter || this.sorter;
this.select = this.options.select || this.select;
this.autoSelect = typeof this.options.autoSelect == 'boolean' ? this.options.autoSelect : true;
this.highlighter = this.options.highlighter || this.highlighter;
this.render = this.options.render || this.render;
this.updater = this.options.updater || this.updater;
this.displayText = this.options.displayText || this.displayText;
this.itemLink = this.options.itemLink || this.itemLink;
this.itemTitle = this.options.itemTitle || this.itemTitle;
this.followLinkOnSelect = this.options.followLinkOnSelect || this.followLinkOnSelect;
this.source = this.options.source;
this.delay = this.options.delay;
this.theme = this.options.theme && this.options.themes && this.options.themes[this.options.theme] || Typeahead.defaults.themes[Typeahead.defaults.theme];
this.$menu = $(this.options.menu || this.theme.menu);
this.$appendTo = this.options.appendTo ? $(this.options.appendTo) : null;
this.fitToElement = typeof this.options.fitToElement == 'boolean' ? this.options.fitToElement : false;
this.shown = false;
this.listen();
this.showHintOnFocus = typeof this.options.showHintOnFocus == 'boolean' || this.options.showHintOnFocus === 'all' ? this.options.showHintOnFocus : false;
this.afterSelect = this.options.afterSelect;
this.afterEmptySelect = this.options.afterEmptySelect;
this.addItem = false;
this.value = this.$element.val() || this.$element.text();
this.keyPressed = false;
this.focused = this.$element.is(':focus');
this.changeInputOnSelect = this.options.changeInputOnSelect || this.changeInputOnSelect;
this.changeInputOnMove = this.options.changeInputOnMove || this.changeInputOnMove;
this.openLinkInNewTab = this.options.openLinkInNewTab || this.openLinkInNewTab;
this.selectOnBlur = this.options.selectOnBlur || this.selectOnBlur;
this.showCategoryHeader = this.options.showCategoryHeader || this.showCategoryHeader;
};
Typeahead.prototype = {
constructor: Typeahead,
setDefault: function (val) {
// var val = this.$menu.find('.active').data('value');
this.$element.data('active', val);
if (this.autoSelect || val) {
var newVal = this.updater(val);
// Updater can be set to any random functions via "options" parameter in constructor above.
// Add null check for cases when updater returns void or undefined.
if (!newVal) {
newVal = '';
}
this.$element
.val(this.displayText(newVal) || newVal)
.text(this.displayText(newVal) || newVal)
.change();
this.afterSelect(newVal);
}
return this.hide();
},
select: function () {
var val = this.$menu.find('.active').data('value');
this.$element.data('active', val);
if (this.autoSelect || val) {
var newVal = this.updater(val);
// Updater can be set to any random functions via "options" parameter in constructor above.
// Add null check for cases when updater returns void or undefined.
if (!newVal) {
newVal = '';
}
if (this.changeInputOnSelect) {
this.$element
.val(this.displayText(newVal) || newVal)
.text(this.displayText(newVal) || newVal)
.change();
}
if (this.followLinkOnSelect && this.itemLink(val)) {
if (this.openLinkInNewTab) {
window.open(this.itemLink(val), '_blank');
} else {
document.location = this.itemLink(val);
}
this.afterSelect(newVal);
} else if (this.followLinkOnSelect && !this.itemLink(val)) {
this.afterEmptySelect(newVal);
} else {
this.afterSelect(newVal);
}
} else {
this.afterEmptySelect();
}
return this.hide();
},
updater: function (item) {
return item;
},
setSource: function (source) {
this.source = source;
},
show: function () {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
});
var scrollHeight = typeof this.options.scrollHeight == 'function' ?
this.options.scrollHeight.call() :
this.options.scrollHeight;
var element;
if (this.shown) {
element = this.$menu;
} else if (this.$appendTo) {
element = this.$menu.appendTo(this.$appendTo);
this.hasSameParent = this.$appendTo.is(this.$element.parent());
} else {
element = this.$menu.insertAfter(this.$element);
this.hasSameParent = true;
}
if (!this.hasSameParent) {
// We cannot rely on the element position, need to position relative to the window
element.css('position', 'fixed');
var offset = this.$element.offset();
pos.top = offset.top;
pos.left = offset.left;
}
// The rules for bootstrap are: 'dropup' in the parent and 'dropdown-menu-right' in the element.
// Note that to get right alignment, you'll need to specify `menu` in the options to be:
// '<ul class="typeahead dropdown-menu" role="listbox"></ul>'
var dropup = $(element).parent().hasClass('dropup');
var newTop = dropup ? 'auto' : (pos.top + pos.height + scrollHeight);
var right = $(element).hasClass('dropdown-menu-right');
var newLeft = right ? 'auto' : pos.left;
// it seems like setting the css is a bad idea (just let Bootstrap do it), but I'll keep the old
// logic in place except for the dropup/right-align cases.
element.css({ top: newTop, left: newLeft }).show();
if (this.options.fitToElement === true) {
element.css('width', this.$element.outerWidth() + 'px');
}
this.shown = true;
return this;
},
hide: function () {
this.$menu.hide();
this.shown = false;
return this;
},
lookup: function (query) {
if (typeof(query) != 'undefined' && query !== null) {
this.query = query;
} else {
this.query = this.$element.val();
}
if (this.query.length < this.options.minLength && !this.options.showHintOnFocus) {
return this.shown ? this.hide() : this;
}
var worker = $.proxy(function () {
// Bloodhound (since 0.11) needs three arguments.
// Two of them are callback functions (sync and async) for local and remote data processing
// see https://github.com/twitter/typeahead.js/blob/master/src/bloodhound/bloodhound.js#L132
if ($.isFunction(this.source) && this.source.length === 3) {
this.source(this.query, $.proxy(this.process, this), $.proxy(this.process, this));
} else if ($.isFunction(this.source)) {
this.source(this.query, $.proxy(this.process, this));
} else if (this.source) {
this.process(this.source);
}
}, this);
clearTimeout(this.lookupWorker);
this.lookupWorker = setTimeout(worker, this.delay);
},
process: function (items) {
var that = this;
items = $.grep(items, function (item) {
return that.matcher(item);
});
items = this.sorter(items);
if (!items.length && !this.options.addItem) {
return this.shown ? this.hide() : this;
}
if (items.length > 0) {
this.$element.data('active', items[0]);
} else {
this.$element.data('active', null);
}
if (this.options.items != 'all') {
items = items.slice(0, this.options.items);
}
// Add item
if (this.options.addItem) {
items.push(this.options.addItem);
}
return this.render(items).show();
},
matcher: function (item) {
var it = this.displayText(item);
return ~it.toLowerCase().indexOf(this.query.toLowerCase());
},
sorter: function (items) {
var beginswith = [];
var caseSensitive = [];
var caseInsensitive = [];
var item;
while ((item = items.shift())) {
var it = this.displayText(item);
if (!it.toLowerCase().indexOf(this.query.toLowerCase())) {
beginswith.push(item);
} else if (~it.indexOf(this.query)) {
caseSensitive.push(item);
} else {
caseInsensitive.push(item);
}
}
return beginswith.concat(caseSensitive, caseInsensitive);
},
highlighter: function (item) {
var text = this.query;
if (text === '') {
return item;
}
var matches = item.match(/(>)([^<]*)(<)/g);
var first = [];
var second = [];
var i;
if (matches && matches.length) {
// html
for (i = 0; i < matches.length; ++i) {
if (matches[i].length > 2) {// escape '><'
first.push(matches[i]);
}
}
} else {
// text
first = [];
first.push(item);
}
text = text.replace((/[\(\)\/\.\*\+\?\[\]]/g), function (mat) {
return '\\' + mat;
});
var reg = new RegExp(text, 'g');
var m;
for (i = 0; i < first.length; ++i) {
m = first[i].match(reg);
if (m && m.length > 0) {// find all text nodes matches
second.push(first[i]);
}
}
for (i = 0; i < second.length; ++i) {
item = item.replace(second[i], second[i].replace(reg, '<strong>$&</strong>'));
}
return item;
},
render: function (items) {
var that = this;
var self = this;
var activeFound = false;
var data = [];
var _category = that.options.separator;
$.each(items, function (key, value) {
// inject separator
if (key > 0 && value[_category] !== items[key - 1][_category]) {
data.push({
__type: 'divider'
});
}
if (that.showCategoryHeader) {
// inject category header
if (value[_category] && (key === 0 || value[_category] !== items[key - 1][_category])) {
data.push({
__type: 'category',
name: value[_category]
});
}
}
data.push(value);
});
items = $(data).map(function (i, item) {
if ((item.__type || false) == 'category'){
return $(that.options.headerHtml || that.theme.headerHtml).text(item.name)[0];
}
if ((item.__type || false) == 'divider'){
return $(that.options.headerDivider || that.theme.headerDivider)[0];
}
var text = self.displayText(item);
i = $(that.options.item || that.theme.item).data('value', item);
i.find(that.options.itemContentSelector || that.theme.itemContentSelector)
.addBack(that.options.itemContentSelector || that.theme.itemContentSelector)
.html(that.highlighter(text, item));
if(that.options.followLinkOnSelect) {
i.find('a').attr('href', self.itemLink(item));
}
i.find('a').attr('title', self.itemTitle(item));
if (text == self.$element.val()) {
i.addClass('active');
self.$element.data('active', item);
activeFound = true;
}
return i[0];
});
if (this.autoSelect && !activeFound) {
items.filter(':not(.dropdown-header)').first().addClass('active');
this.$element.data('active', items.first().data('value'));
}
this.$menu.html(items);
return this;
},
displayText: function (item) {
return typeof item !== 'undefined' && typeof item.name != 'undefined' ? item.name : item;
},
itemLink: function (item) {
return null;
},
itemTitle: function (item) {
return null;
},
next: function (event) {
var active = this.$menu.find('.active').removeClass('active');
var next = active.next();
if (!next.length) {
next = $(this.$menu.find($(this.options.item || this.theme.item).prop('tagName'))[0]);
}
while (next.hasClass('divider') || next.hasClass('dropdown-header')) {
next = next.next();
}
next.addClass('active');
// added for screen reader
var newVal = this.updater(next.data('value'));
if (this.changeInputOnMove) {
this.$element.val(this.displayText(newVal) || newVal);
}
},
prev: function (event) {
var active = this.$menu.find('.active').removeClass('active');
var prev = active.prev();
if (!prev.length) {
prev = this.$menu.find($(this.options.item || this.theme.item).prop('tagName')).last();
}
while (prev.hasClass('divider') || prev.hasClass('dropdown-header')) {
prev = prev.prev();
}
prev.addClass('active');
// added for screen reader
var newVal = this.updater(prev.data('value'));
if (this.changeInputOnMove) {
this.$element.val(this.displayText(newVal) || newVal);
}
},
listen: function () {
this.$element
.on('focus.bootstrap3Typeahead', $.proxy(this.focus, this))
.on('blur.bootstrap3Typeahead', $.proxy(this.blur, this))
.on('keypress.bootstrap3Typeahead', $.proxy(this.keypress, this))
.on('propertychange.bootstrap3Typeahead input.bootstrap3Typeahead', $.proxy(this.input, this))
.on('keyup.bootstrap3Typeahead', $.proxy(this.keyup, this));
if (this.eventSupported('keydown')) {
this.$element.on('keydown.bootstrap3Typeahead', $.proxy(this.keydown, this));
}
var itemTagName = $(this.options.item || this.theme.item).prop('tagName');
if ('ontouchstart' in document.documentElement && 'onmousemove' in document.documentElement) {
this.$menu
.on('touchstart', itemTagName, $.proxy(this.touchstart, this))
.on('touchend', itemTagName, $.proxy(this.click, this))
.on('click', $.proxy(this.click, this))
.on('mouseenter', itemTagName, $.proxy(this.mouseenter, this))
.on('mouseleave', itemTagName, $.proxy(this.mouseleave, this))
.on('mousedown', $.proxy(this.mousedown,this));
} else if ('ontouchstart' in document.documentElement) {
this.$menu
.on('touchstart', itemTagName, $.proxy(this.touchstart, this))
.on('touchend', itemTagName, $.proxy(this.click, this));
} else {
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', itemTagName, $.proxy(this.mouseenter, this))
.on('mouseleave', itemTagName, $.proxy(this.mouseleave, this))
.on('mousedown', $.proxy(this.mousedown, this));
}
},
destroy: function () {
this.$element.data('typeahead', null);
this.$element.data('active', null);
this.$element
.unbind('focus.bootstrap3Typeahead')
.unbind('blur.bootstrap3Typeahead')
.unbind('keypress.bootstrap3Typeahead')
.unbind('propertychange.bootstrap3Typeahead input.bootstrap3Typeahead')
.unbind('keyup.bootstrap3Typeahead');
if (this.eventSupported('keydown')) {
this.$element.unbind('keydown.bootstrap3-typeahead');
}
this.$menu.remove();
this.destroyed = true;
},
eventSupported: function (eventName) {
var isSupported = eventName in this.$element;
if (!isSupported) {
this.$element.setAttribute(eventName, 'return;');
isSupported = typeof this.$element[eventName] === 'function';
}
return isSupported;
},
move: function (e) {
if (!this.shown) {
return;
}
switch (e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault();
break;
case 38: // up arrow
// with the shiftKey (this is actually the left parenthesis)
if (e.shiftKey) {
return;
}
e.preventDefault();
this.prev();
break;
case 40: // down arrow
// with the shiftKey (this is actually the right parenthesis)
if (e.shiftKey) {
return;
}
e.preventDefault();
this.next();
break;
}
},
keydown: function (e) {
/**
* Prevent to make an ajax call while copying and pasting.
*
* @author Simone Sacchi
* @version 2018/01/18
*/
if (e.keyCode === 17) { // ctrl
return;
}
this.keyPressed = true;
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40, 38, 9, 13, 27]);
if (!this.shown && e.keyCode == 40) {
this.lookup();
} else {
this.move(e);
}
},
keypress: function (e) {
if (this.suppressKeyPressRepeat) {
return;
}
this.move(e);
},
input: function (e) {
// This is a fixed for IE10/11 that fires the input event when a placehoder is changed
// (https://connect.microsoft.com/IE/feedback/details/810538/ie-11-fires-input-event-on-focus)
var currentValue = this.$element.val() || this.$element.text();
if (this.value !== currentValue) {
this.value = currentValue;
this.lookup();
}
},
keyup: function (e) {
if (this.destroyed) {
return;
}
switch (e.keyCode) {
case 40: // down arrow
case 38: // up arrow
case 16: // shift
case 17: // ctrl
case 18: // alt
break;
case 9: // tab
if (!this.shown || (this.showHintOnFocus && !this.keyPressed)) {
return;
}
this.select();
break;
case 13: // enter
if (!this.shown) {
return;
}
this.select();
break;
case 27: // escape
if (!this.shown) {
return;
}
this.hide();
break;
}
},
focus: function (e) {
if (!this.focused) {
this.focused = true;
this.keyPressed = false;
if (this.options.showHintOnFocus && this.skipShowHintOnFocus !== true) {
if (this.options.showHintOnFocus === 'all') {
this.lookup('');
} else {
this.lookup();
}
}
}
if (this.skipShowHintOnFocus) {
this.skipShowHintOnFocus = false;
}
},
blur: function (e) {
if (!this.mousedover && !this.mouseddown && this.shown) {
if (this.selectOnBlur) {
this.select();
}
this.hide();
this.focused = false;
this.keyPressed = false;
} else if (this.mouseddown) {
// This is for IE that blurs the input when user clicks on scroll.
// We set the focus back on the input and prevent the lookup to occur again
this.skipShowHintOnFocus = true;
this.$element.focus();
this.mouseddown = false;
}
},
click: function (e) {
e.preventDefault();
this.skipShowHintOnFocus = true;
this.select();
this.$element.focus();
this.hide();
},
mouseenter: function (e) {
this.mousedover = true;
this.$menu.find('.active').removeClass('active');
$(e.currentTarget).addClass('active');
},
mouseleave: function (e) {
this.mousedover = false;
if (! this.selectOnBlur) {
this.$menu.find('.active').removeClass('active');
}
if (!this.focused && this.shown) {
this.hide();
}
},
/**
* We track the mousedown for IE. When clicking on the menu scrollbar, IE makes the input blur thus hiding the menu.
*/
mousedown: function (e) {
this.mouseddown = true;
this.$menu.one('mouseup', function (e) {
// IE won't fire this, but FF and Chrome will so we reset our flag for them here
this.mouseddown = false;
}.bind(this));
},
touchstart: function (e) {
e.preventDefault();
this.$menu.find('.active').removeClass('active');
$(e.currentTarget).addClass('active');
},
touchend: function (e) {
e.preventDefault();
this.select();
this.$element.focus();
}
};
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
var old = $.fn.typeahead;
$.fn.typeahead = function (option) {
var arg = arguments;
if (typeof option == 'string' && option == 'getActive') {
return this.data('active');
}
return this.each(function () {
var $this = $(this);
var data = $this.data('typeahead');
var options = typeof option == 'object' && option;
if (!data) {
$this.data('typeahead', (data = new Typeahead(this, options)));
}
if (typeof option == 'string' && data[option]) {
if (arg.length > 1) {
data[option].apply(data, Array.prototype.slice.call(arg, 1));
} else {
data[option]();
}
}
});
};
Typeahead.defaults = {
source: [],
items: 8,
minLength: 1,
scrollHeight: 0,
autoSelect: true,
afterSelect: $.noop,
afterEmptySelect: $.noop,
addItem: false,
followLinkOnSelect: false,
delay: 0,
separator: 'category',
changeInputOnSelect: true,
changeInputOnMove: true,
openLinkInNewTab: false,
selectOnBlur: true,
showCategoryHeader: true,
theme: "bootstrap3",
themes: {
bootstrap3: {
menu: '<ul class="typeahead dropdown-menu" role="listbox"></ul>',
item: '<li><a class="dropdown-item" href="#" role="option"></a></li>',
itemContentSelector: "a",
headerHtml: '<li class="dropdown-header"></li>',
headerDivider: '<li class="divider" role="separator"></li>'
},
bootstrap4: {
menu: '<div class="typeahead dropdown-menu" role="listbox"></div>',
item: '<button class="dropdown-item" role="option"></button>',
itemContentSelector: '.dropdown-item',
headerHtml: '<h6 class="dropdown-header"></h6>',
headerDivider: '<div class="dropdown-divider"></div>'
}
}
};
$.fn.typeahead.Constructor = Typeahead;
/* TYPEAHEAD NO CONFLICT
* =================== */
$.fn.typeahead.noConflict = function () {
$.fn.typeahead = old;
return this;
};
/* TYPEAHEAD DATA-API
* ================== */
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this);
if ($this.data('typeahead')) {
return;
}
$this.typeahead($this.data());
});
}));

View File

@ -1,23 +0,0 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">Example Component</div>
<div class="card-body">
I'm an example component.
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
</script>

View File

@ -1 +1 @@
//
// @import "node_modules/bootstrap/scss/bootstrap";

View File

@ -0,0 +1,90 @@
@extends('architect::layouts.auth')
@section('htmlheader_title')
Log in
@endsection
@section('content')
@if(isset($login_note) AND $login_note)
<div class="alert alert-info alert-dismissible m-auto">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-info"></i> NOTE!</h5>
{!! $login_note !!}
</div>
<br>
@endisset
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if (Session::has('error'))
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
<li>{{ Session::get('error') }}</li>
</ul>
</div>
@endif
<!-- /.login-logo -->
<div class="app-container app-theme-white body-tabs-shadow">
<div class="app-container">
<div class="h-100 bg-animation">
<div class="d-flex h-100 justify-content-center align-items-center">
<div class="mx-auto app-login-box col-md-8">
<div class="modal-dialog w-100 mx-auto">
<div class="modal-content">
<form method="post">
{{ csrf_field() }}
<div class="modal-body">
<div class="h5 modal-title text-center">
<h4 class="mt-2">
<div class="app-logo mx-auto mb-3"><img class="w-75" src="{{ url('img/logo-h-lg.png') }}"></div>
<small>Please sign in to your account below.</small>
</h4>
</div>
<div class="form-row">
<div class="col-md-12">
<div class="position-relative form-group">
<input name="{{ config('ldap_auth.identifiers.ldap.locate_users_by') }}" id="user" placeholder="Email..." type="email" class="form-control">
</div>
</div>
<div class="col-md-12">
<div class="position-relative form-group">
<input name="password" id="password" placeholder="Password..." type="password" class="form-control">
</div>
</div>
</div>
{{--
<div class="divider"></div>
<h6 class="mb-0">No account? <a href="javascript:void(0);" class="text-primary">Sign up now</a></h6>
--}}
</div>
<div class="modal-footer">
{{--
<div class="float-left">
<a href="javascript:void(0);" class="btn-lg btn btn-link">Recover Password</a>
</div>
--}}
<div class="float-right">
<button class="btn btn-primary btn-lg">Login</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show
<body>
<div class="app-container app-theme-white body-tabs-shadow fixed-sidebar">
@include('architect::layouts.partials.topmenu')
@includeIf('architect::layouts.partials.controlsidebar')
<div class="app-main">
@include('architect::layouts.partials.sidebarmenu')
<div class="app-main__outer">
<div class="app-main__inner">
@include('architect::layouts.partials.contentheader')
<!-- Main content -->
<div class="row">
<div class="col-12">
<!-- Your Page Content Here -->
@yield('main-content')
</div>
</div>
</div>
@include('architect::layouts.partials.contentfooter')
</div>
</div>
</div>
@section('scripts')
@include('architect::layouts.partials.scripts')
{{-- Scripts --}}
{!! Asset::scripts() !!}
@yield('page-scripts')
@show
</body>
</html>

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show
<body class="hold-transition login-page">
<div id="app">
@yield('content')
</div>
@section('scripts')
@include('architect::auth.partials.scripts')
@show
</body>
</html>

View File

@ -0,0 +1,29 @@
<div class="app-wrapper-footer">
<div class="app-footer">
<div class="app-footer__inner">
<div class="app-footer-left">
<ul class="nav">
{{--
<li class="nav-item">
<a href="javascript:void(0);" class="nav-link">Footer Link</a>
</li>
--}}
</ul>
</div>
<div class="app-footer-right">
<ul class="nav">
{{--
<li class="nav-item">
<a href="javascript:void(0);" class="nav-link">
<div class="badge badge-success mr-1 ml-0">
<small>NEW</small>
</div>
Footer Link
</a>
</li>
--}}
</ul>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,44 @@
<div class="app-page-title">
<div class="page-title-wrapper">
<div class="page-title-heading">
<div class="page-title-icon">
<i class="@yield('page_icon','pe-7s-car')"></i>
</div>
<div>
@yield('page_title','Page Title')
<div class="page-title-subheading">
@yield('page_subtitle','Page Sub Title')
</div>
</div>
</div>
<div class="page-title-actions">
{{--
<button type="button" data-toggle="tooltip" title="Example Tooltip" data-placement="bottom" class="btn-shadow mr-3 btn btn-dark">
<i class="fa fa-star"></i>
</button>
--}}
<div class="d-inline-block dropdown">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn-shadow dropdown-toggle btn btn-info">
<span class="btn-icon-wrapper pr-2 opacity-7">
<i class="fa fa-business-time fa-w-20"></i>
</span>
Item Menu
</button>
<div tabindex="-1" role="menu" aria-hidden="true" class="dropdown-menu dropdown-menu-right">
<ul class="nav flex-column">
{{--
<li class="nav-item">
<a href="javascript:void(0);" class="nav-link">
<i class="nav-link-icon lnr-inbox"></i>
<span>Inbox</span>
<div class="ml-auto badge badge-pill badge-secondary">86</div>
</a>
</li>
--}}
</ul>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,51 @@
<head>
<!--
=========================================================
* ArchitectUI HTML Theme Dashboard - v1.0.0
=========================================================
* Product Page: https://dashboardpack.com
* Copyright 2019 DashboardPack (https://dashboardpack.com)
* Licensed under MIT (https://github.com/DashboardPack/architectui-html-theme-free/blob/master/LICENSE)
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{{ config('app.name') }} - @yield('htmlheader_title','Your title here')</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
<meta name="description" content="phpLDAPadmin - A web interface into LDAP data management">
<meta name="msapplication-tap-highlight" content="no">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css2?family={{ str_replace(' ','+',config('app.font') ?: 'IBM Plex Sans') }}:wght@300&display=swap" rel="stylesheet">
@if(file_exists('css/print.css'))
<!-- Printing Modifications -->
<link rel="stylesheet" href="{{ asset('/css/print.css') }}">
@endif
<!-- Fancy Tree -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.36.1/skin-xp/ui.fancytree.min.css">
<!-- STYLESHEETS -->
{!! Asset::styles() !!}
<!-- Theme style -->
<link rel="stylesheet" href="{{ asset('/css/architect.min.css') }}">
@if(file_exists('css/fixes.css'))
<!-- CSS Fixes -->
<link rel="stylesheet" href="{{ asset('/css/fixes.css') }}">
@endif
@if(file_exists('css/custom.css'))
<!-- Custom CSS -->
<link rel="stylesheet" href="{{ asset('/css/custom.css') }}">
@endif
</head>

View File

@ -0,0 +1,100 @@
<script src="{{ asset('/js/app.js') }}" type="text/javascript"></script>
{{--
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
--}}
<!-- Architect -->
<script src="{{ asset('/js/architect.min.js') }}"></script>
<script type="text/javascript">
// Our CSRF token to each interaction
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ArchitectSidebarTweak = {};
$.ArchitectSidebarTweak.Open = true;
$.ArchitectSidebarTweak.ResizeDelay = 1000;
$.ArchitectSidebarTweak.options = {
EnableRemember: true,
//Removes the transition after page reload.
NoTransitionAfterReload: false
};
// Work out our timezone.
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
/**
* Open and close the sidebar
* @param state
* @param addclass
*/
function sidebaropenclose(state,addclass) {
// Dont do anything if the state hasnt changed.
if (state == $.ArchitectSidebarTweak.Open) {
return;
}
$.ArchitectSidebarTweak.Open = state;
if (addclass !== 'undefined')
if (state)
$(".app-container")
.removeClass('closed-sidebar');
else
$(".app-container")
.addClass('closed-sidebar');
$(this).delay($.ArchitectSidebarTweak.ResizeDelay).queue(function() {
window.dispatchEvent(new Event('resize'));
$(this).dequeue();
});
}
$(function () {
"use strict";
// @todo This event were for AdminLTE.
$("body").on("collapsed.lte.pushmenu", function(){
if($.ArchitectSidebarTweak.options.EnableRemember) {
document.cookie = "toggleState=closed;path=/";
$("body").queue(sidebaropenclose(false));
}
});
$("body").on("shown.lte.pushmenu", function(){
if($.ArchitectSidebarTweak.options.EnableRemember){
document.cookie = "toggleState=opened;path=/";
$("body").queue(sidebaropenclose(true));
}
});
if($.ArchitectSidebarTweak.options.EnableRemember){
var re = new RegExp('toggleState' + "=([^;]+)");
var value = re.exec(document.cookie);
var toggleState = (value != null) ? unescape(value[1]) : null;
if(toggleState == 'closed'){
if($.ArchitectSidebarTweak.options.NoTransitionAfterReload){
$("body").addClass('sidebar-collapse hold-transition').delay(100).queue(function(){
$(this).removeClass('hold-transition');
});
}else{
$("body").queue(sidebaropenclose(false,true));
}
}
}
});
</script>
<!-- Fancy Tree -->
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.36.1/jquery.fancytree-all.min.js"></script>
@if(file_exists('js/custom.js'))
<!-- Any Custom JS -->
<script src="{{ asset('js/custom.js') }}"></script>
@endif

View File

@ -0,0 +1,43 @@
<div class="app-sidebar sidebar-shadow">
<div class="app-header__logo">
<div class="logo-src"></div>
<div class="header__pane ml-auto">
<div>
<button type="button" class="hamburger close-sidebar-btn hamburger--elastic" data-class="closed-sidebar">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
</div>
</div>
<div class="app-header__mobile-menu">
<div>
<button type="button" class="hamburger hamburger--elastic mobile-toggle-nav">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
</div>
<div class="app-header__menu">
<span>
<button type="button" class="btn-icon btn-icon-only btn btn-primary btn-sm mobile-toggle-header-nav">
<span class="btn-icon-wrapper">
<i class="fas fa-ellipsis-v fa-w-6"></i>
</span>
</button>
</span>
</div>
<div class="scrollbar-sidebar scrollbar-container">
<div class="app-sidebar__inner">
<ul class="vertical-nav-menu">
<li class="app-sidebar__heading">{{ $server ?? 'Server Name' }}</li>
<li>
<i id="treeicon" class="metismenu-icon fa-fw fas fa-sitemap"></i>
<span id="tree"></span>
</li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,92 @@
<div class="app-header header-shadow bg-dark header-text-light">
<div class="app-header__logo">
<div class="logo-src"></div>
<div class="header__pane ml-auto">
<div>
<button type="button" class="hamburger close-sidebar-btn hamburger--elastic" data-class="closed-sidebar">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
</div>
</div>
<div class="app-header__mobile-menu">
<div>
<button type="button" class="hamburger hamburger--elastic mobile-toggle-nav">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
</div>
</div>
<div class="app-header__menu">
<span>
<button type="button" class="btn-icon btn-icon-only btn btn-primary btn-sm mobile-toggle-header-nav">
<span class="btn-icon-wrapper">
<i class="fas fa-ellipsis-v fa-w-6"></i>
</span>
</button>
</span>
</div>
<div class="app-header__content">
<div class="app-header-left">
<div class="search-wrapper">
<div class="input-holder">
<input type="text" class="search-input" placeholder="Type to search">
<button class="search-icon"><span></span></button>
</div>
<button class="close"></button>
</div>
<ul class="header-menu nav">
{{--
<li class="nav-item">
<a href="javascript:void(0);" class="nav-link">
<i class="nav-link-icon fas fa-database"></i> Link
</a>
</li>
--}}
</ul>
</div>
<div class="app-header-right">
<div class="header-btn-lg pr-0">
<div class="widget-content p-0">
<div class="widget-content-wrapper">
<div class="widget-content-left">
<div class="btn-group">
<a data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="p-0 btn">
<img width="42" class="rounded-circle" src="assets/images/avatars/1.jpg" alt="">
<i class="fas fa-angle-down ml-2 opacity-8"></i>
</a>
<div tabindex="-1" role="menu" aria-hidden="true" class="dropdown-menu dropdown-menu-right">
{{--
<button type="button" tabindex="0" class="dropdown-item">User Account</button>
<h6 tabindex="-1" class="dropdown-header">Header</h6>
<button type="button" tabindex="0" class="dropdown-item">Actions</button>
<div tabindex="-1" class="dropdown-divider"></div>
<button type="button" tabindex="0" class="dropdown-item">Dividers</button>
--}}
</div>
</div>
</div>
<div class="widget-content-left ml-3 header-user-info">
<div class="widget-heading">
{{ $user->name ?? 'John Smith' }}
</div>
<div class="widget-subheading">
{{ $user->title ?? 'Primary Developer' }}
</div>
</div>
<div class="widget-content-right header-user-info ml-3">
<button type="button" class="btn-shadow p-1 btn btn-primary btn-sm show-toastr-example">
<i class="fas text-white fa-calendar pr-1 pl-1"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
@extends('adminlte::layouts.app')
@extends('architect::layouts.app')
@section('htmlheader_title')
Home
@ -38,62 +38,4 @@
</div>
@endsection
@section('page-scripts')
@js('https://code.jquery.com/ui/1.12.1/jquery-ui.min.js','jquery-ui')
@js('https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.36.1/jquery.fancytree-all.min.js','fancytree-js-all')
@css('https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.36.1/skin-xp/ui.fancytree.min.css','fancytree-css')
<script type="text/javascript">
function expandChildren(node) {
if (node.data.autoExpand && !node.isExpanded()) {
node.setExpanded(true);
}
if (node.children && node.children.length > 0) {
try {
node.children.forEach(expandChildren);
} catch (error) {
}
}
}
$(document).ready(function() {
// Attach the fancytree widget to an existing <div id="tree"> element
// and pass the tree options as an argument to the fancytree() function:
$('#tree').fancytree({
clickFolderMode: 3,
extensions: ['glyph'],
autoCollapse: true, // Automatically collapse all siblings, when a node is expanded.
autoScroll: true, // Automatically scroll nodes into visible area.
focusOnSelect: true, // Set focus when node is checked by a mouse click
click: function(event, data) {
if (data.targetType == 'title')
return false;
},
init: function(event, data) {
expandChildren(data.tree.rootNode);
},
source: {
url: "{{ url('api/bases') }}"
},
lazyLoad: function(event,data) {
data.result = {
url: "{{ url('api/query') }}",
data: {key: data.node.data.item,depth: 1}
};
expandChildren(data.tree.rootNode);
},
keydown: function(event, data){
switch( $.ui.fancytree.eventToString(data.originalEvent) ) {
case "return":
case "space":
data.node.toggleExpanded();
break;
}
}
});
});
</script>
@append

View File

@ -1,105 +0,0 @@
@extends('adminlte::layouts.auth')
@section('htmlheader_title')
Log in
@endsection
@section('content')
@if(isset($login_note) AND $login_note)
<div class="alert alert-info alert-dismissible m-auto">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<h5><i class="icon fas fa-info"></i> NOTE!</h5>
{!! $login_note !!}
</div>
<br>
@endisset
<div class="login-box m-auto">
<div class="login-logo">
<a>{!! config('app.name_html_long') !!}</a>
</div>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if (Session::has('error'))
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
<li>{{ Session::get('error') }}</li>
</ul>
</div>
@endif
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">{{ trans('adminlte_lang::message.siginsession') }}</p>
<form method="post">
{{ csrf_field() }}
<div class="row">
<div class="col-12">
<div class="input-group mb-3">
<input type="email" name="{{ config('ldap_auth.identifiers.ldap.locate_users_by') }}" class="form-control" placeholder="Email">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-envelope fa-fw"></i></span>
</div>
</div>
</div>
<div class="col-12">
<div class="input-group mb-3">
<input type="password" name="password" class="form-control" placeholder="Password">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-key fa-fw"></i></span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-8">
<div class="checkbox icheck">
<label>
<input type="checkbox" name="remember"> Remember Me
</label>
</div>
</div>
<!-- /.col -->
<div class="col-4">
<button type="submit" name="submit" class="btn btn-primary mr-0 float-right">Sign In</button>
</div>
<!-- /.col -->
</div>
</form>
@if(count(config('auth.social',[])))
@include('adminlte::auth.partials.social_login')
@endif
<p class="mb-1">
<a name="reset" href="{{ url('password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a>
</p>
@isset($register)
<p class="mb-0">
<a href="{{ url('register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
</p>
@endisset
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
@endsection

View File

@ -1,5 +0,0 @@
<li class="nav-header pl-1">{{ $server ?? 'Server Name' }}</li>
<li>
<div id="tree"></div>
</li>

View File

@ -20,5 +20,6 @@ Auth::routes([
'verify' => false,
'register' => false,
]);
Route::redirect('/','home');
Route::get('logout','Auth\LoginController@logout');
Route::get('home','HomeController@home');

4
webpack.mix.js vendored
View File

@ -11,5 +11,5 @@ const mix = require('laravel-mix');
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
mix.js(['resources/js/app.js','resources/js/bootstrap3-typeahead.js'],'public/js')
.sass('resources/sass/app.scss','public/css');