|
@@ -1,6 +1,17 @@
|
|
|
<?php
|
|
<?php
|
|
|
-if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
|
|
- $pageSettingsTabEditorTabsPerformanceIcon = $GLOBALS['performanceDisableIconDropdown'] ? '' : '
|
|
|
|
|
|
|
+$GLOBALS['organizrPages'][] = 'settings_tab_editor_tabs';
|
|
|
|
|
+function get_page_settings_tab_editor_tabs($Organizr)
|
|
|
|
|
+{
|
|
|
|
|
+ if (!$Organizr) {
|
|
|
|
|
+ $Organizr = new Organizr();
|
|
|
|
|
+ }
|
|
|
|
|
+ if ((!$Organizr->hasDB())) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!$Organizr->qualifyRequest(1, true)) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ $pageSettingsTabEditorTabsPerformanceIcon = $Organizr->config['performanceDisableIconDropdown'] ? '' : '
|
|
|
allIcons().success(function(data) {
|
|
allIcons().success(function(data) {
|
|
|
$(".tabIconIconList").select2({
|
|
$(".tabIconIconList").select2({
|
|
|
data: data,
|
|
data: data,
|
|
@@ -13,13 +24,13 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
templateSelection: formatImage,
|
|
templateSelection: formatImage,
|
|
|
});
|
|
});
|
|
|
';
|
|
';
|
|
|
- $pageSettingsTabEditorTabsPerformanceImage = $GLOBALS['performanceDisableImageDropdown'] ? '' : '
|
|
|
|
|
|
|
+ $pageSettingsTabEditorTabsPerformanceImage = $Organizr->config['performanceDisableImageDropdown'] ? '' : '
|
|
|
$(".tabIconImageList").select2({
|
|
$(".tabIconImageList").select2({
|
|
|
templateResult: formatImage,
|
|
templateResult: formatImage,
|
|
|
templateSelection: formatImage,
|
|
templateSelection: formatImage,
|
|
|
});
|
|
});
|
|
|
';
|
|
';
|
|
|
- $pageSettingsTabEditorTabs = '
|
|
|
|
|
|
|
+ return '
|
|
|
<script>
|
|
<script>
|
|
|
buildTabEditor();
|
|
buildTabEditor();
|
|
|
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
|
|
!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);
|
|
@@ -81,24 +92,24 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="new-tab-form-inputNameNew" lang="en">Tab Name</label>
|
|
<label class="control-label" for="new-tab-form-inputNameNew" lang="en">Tab Name</label>
|
|
|
- <input type="text" class="form-control" id="new-tab-form-inputNameNew" name="tabName" required="" autofocus>
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="new-tab-form-inputNameNew" name="name" required="" autofocus>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="new-tab-form-inputURLNew" lang="en">Tab URL</label>
|
|
<label class="control-label" for="new-tab-form-inputURLNew" lang="en">Tab URL</label>
|
|
|
- <input type="text" class="form-control" id="new-tab-form-inputURLNew" name="tabURL" required="">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="new-tab-form-inputURLNew" name="url" required="">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="new-tab-form-inputURLLocalNew" lang="en">Tab Local URL</label>
|
|
<label class="control-label" for="new-tab-form-inputURLLocalNew" lang="en">Tab Local URL</label>
|
|
|
- <input type="text" class="form-control" id="new-tab-form-inputURLLocalNew" name="tabLocalURL">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="new-tab-form-inputURLLocalNew" name="url_local">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="new-tab-form-inputPingURLNew" lang="en">Ping URL</label>
|
|
<label class="control-label" for="new-tab-form-inputPingURLNew" lang="en">Ping URL</label>
|
|
|
- <input type="text" class="form-control" id="new-tab-form-inputPingURLNew" name="pingURL" placeholder="host/ip:port">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="new-tab-form-inputPingURLNew" name="ping_url" placeholder="host/ip:port">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="new-tab-form-inputTabActionTypeNew" lang="en">Tab Auto Action</label>
|
|
<label class="control-label" for="new-tab-form-inputTabActionTypeNew" lang="en">Tab Auto Action</label>
|
|
|
- <select class="form-control" id="new-tab-form-inputTabActionTypeNew" name="tabActionType">
|
|
|
|
|
|
|
+ <select class="form-control" id="new-tab-form-inputTabActionTypeNew" name="timeout">
|
|
|
<option value="null">None</option>
|
|
<option value="null">None</option>
|
|
|
<option value="1">Auto Close</option>
|
|
<option value="1">Auto Close</option>
|
|
|
<option value="2">Auto Reload</option>
|
|
<option value="2">Auto Reload</option>
|
|
@@ -106,13 +117,13 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="new-tab-form-inputTabActionTimeNew" lang="en">Tab Auto Action Minutes</label>
|
|
<label class="control-label" for="new-tab-form-inputTabActionTimeNew" lang="en">Tab Auto Action Minutes</label>
|
|
|
- <input type="number" class="form-control" id="new-tab-form-inputTabActionTimeNew" name="tabActionTime" placeholder="0">
|
|
|
|
|
|
|
+ <input type="number" class="form-control" id="new-tab-form-inputTabActionTimeNew" name="timeout_ms" placeholder="0">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="new-tab-form-chooseImage" lang="en">Choose Image</label>
|
|
<label class="control-label" for="new-tab-form-chooseImage" lang="en">Choose Image</label>
|
|
|
- ' . imageSelect("new-tab-form") . '
|
|
|
|
|
|
|
+ ' . $Organizr->imageSelect("new-tab-form") . '
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="new-tab-form-chooseIcon" lang="en">Choose Icon</label>
|
|
<label class="control-label" for="new-tab-form-chooseIcon" lang="en">Choose Icon</label>
|
|
@@ -121,7 +132,7 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="new-tab-form-inputImageNew" lang="en">Tab Image</label>
|
|
<label class="control-label" for="new-tab-form-inputImageNew" lang="en">Tab Image</label>
|
|
|
- <input type="text" class="form-control" id="new-tab-form-inputImageNew" name="tabImage" required="">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="new-tab-form-inputImageNew" name="image" required="">
|
|
|
</div>
|
|
</div>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
<button class="btn btn-sm btn-info btn-rounded waves-effect waves-light row b-none testTab" type="button"><span class="btn-label"><i class="fa fa-flask"></i></span><span lang="en">Test Tab</span></button>
|
|
<button class="btn btn-sm btn-info btn-rounded waves-effect waves-light row b-none testTab" type="button"><span class="btn-label"><i class="fa fa-flask"></i></span><span lang="en">Test Tab</span></button>
|
|
@@ -143,24 +154,24 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="edit-tab-form-inputName" lang="en">Tab Name</label>
|
|
<label class="control-label" for="edit-tab-form-inputName" lang="en">Tab Name</label>
|
|
|
- <input type="text" class="form-control" id="edit-tab-form-inputName" name="tabName" required="" autofocus>
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="edit-tab-form-inputName" name="name" required="" autofocus>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="edit-tab-form-inputURL" lang="en">Tab URL</label>
|
|
<label class="control-label" for="edit-tab-form-inputURL" lang="en">Tab URL</label>
|
|
|
- <input type="text" class="form-control" id="edit-tab-form-inputURL" name="tabURL" required="">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="edit-tab-form-inputURL" name="url" required="">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="edit-tab-form-inputLocalURL" lang="en">Tab Local URL</label>
|
|
<label class="control-label" for="edit-tab-form-inputLocalURL" lang="en">Tab Local URL</label>
|
|
|
- <input type="text" class="form-control" id="edit-tab-form-inputLocalURL" name="tabLocalURL">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="edit-tab-form-inputLocalURL" name="url_local">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="edit-tab-form-pingURL" lang="en">Ping URL</label>
|
|
<label class="control-label" for="edit-tab-form-pingURL" lang="en">Ping URL</label>
|
|
|
- <input type="text" class="form-control" id="edit-tab-form-pingURL" name="pingURL" placeholder="host/ip:port">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="edit-tab-form-pingURL" name="ping_url" placeholder="host/ip:port">
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="edit-tab-form-inputTabActionTypeNew" lang="en">Tab Auto Action</label>
|
|
<label class="control-label" for="edit-tab-form-inputTabActionTypeNew" lang="en">Tab Auto Action</label>
|
|
|
- <select class="form-control" id="edit-tab-form-inputTabActionTypeNew" name="tabActionType">
|
|
|
|
|
|
|
+ <select class="form-control" id="edit-tab-form-inputTabActionTypeNew" name="timeout">
|
|
|
<option value="null">None</option>
|
|
<option value="null">None</option>
|
|
|
<option value="1">Auto Close</option>
|
|
<option value="1">Auto Close</option>
|
|
|
<option value="2">Auto Reload</option>
|
|
<option value="2">Auto Reload</option>
|
|
@@ -168,13 +179,13 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="edit-tab-form-inputTabActionTimeNew" lang="en">Tab Auto Action Minutes</label>
|
|
<label class="control-label" for="edit-tab-form-inputTabActionTimeNew" lang="en">Tab Auto Action Minutes</label>
|
|
|
- <input type="number" class="form-control" id="edit-tab-form-inputTabActionTimeNew" name="tabActionTime">
|
|
|
|
|
|
|
+ <input type="number" class="form-control" id="edit-tab-form-inputTabActionTimeNew" name="timeout_ms">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="edit-tab-form-chooseImage" lang="en">Choose Image</label>
|
|
<label class="control-label" for="edit-tab-form-chooseImage" lang="en">Choose Image</label>
|
|
|
- ' . imageSelect("edit-tab-form") . '
|
|
|
|
|
|
|
+ ' . $Organizr->imageSelect("edit-tab-form") . '
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group col-lg-6">
|
|
<div class="form-group col-lg-6">
|
|
|
<label class="control-label" for="edit-tab-form-chooseIcon" lang="en">Choose Icon</label>
|
|
<label class="control-label" for="edit-tab-form-chooseIcon" lang="en">Choose Icon</label>
|
|
@@ -183,7 +194,7 @@ if (file_exists($GLOBALS['userConfigPath'])) {
|
|
|
</div>
|
|
</div>
|
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
<label class="control-label" for="edit-tab-form-inputImage" lang="en">Tab Image</label>
|
|
<label class="control-label" for="edit-tab-form-inputImage" lang="en">Tab Image</label>
|
|
|
- <input type="text" class="form-control" id="edit-tab-form-inputImage" name="tabImage" required="">
|
|
|
|
|
|
|
+ <input type="text" class="form-control" id="edit-tab-form-inputImage" name="image" required="">
|
|
|
</div>
|
|
</div>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
<button class="btn btn-sm btn-info btn-rounded waves-effect waves-light row b-none testEditTab" type="button"><span class="btn-label"><i class="fa fa-flask"></i></span><span lang="en">Test Tab</span></button>
|
|
<button class="btn btn-sm btn-info btn-rounded waves-effect waves-light row b-none testEditTab" type="button"><span class="btn-label"><i class="fa fa-flask"></i></span><span lang="en">Test Tab</span></button>
|