Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/browser-sync-ui/lib/plugins/sync-options/ drwxrwxr-x | |
| Viewing file: Select action/file-type: (function (angular) {
const SECTION_NAME = "sync-options";
angular
.module("BrowserSync")
.controller("SyncOptionsController", [
"Socket",
"options",
"pagesConfig",
SyncOptionsController
]);
/**
* @param Socket
* @param options
* @param pagesConfig
* @constructor
*/
function SyncOptionsController(Socket, options, pagesConfig) {
var ctrl = this;
ctrl.options = options.bs;
ctrl.section = pagesConfig[SECTION_NAME];
ctrl.setMany = function (value) {
Socket.uiEvent({
namespace: SECTION_NAME,
event: "setMany",
data: {
value: value
}
});
ctrl.syncItems = ctrl.syncItems.map(function (item) {
item.value = value;
return item;
});
};
/**
* Toggle Options
* @param item
*/
ctrl.toggleSyncItem = function (item) {
Socket.uiEvent({
namespace: SECTION_NAME,
event: "set",
data: {
path: item.path,
value: item.value
}
});
};
ctrl.syncItems = [];
var taglines = {
clicks: "Mirror clicks across devices",
scroll: "Mirror scroll position across devices",
"ghostMode.submit": "Form Submissions will be synced",
"ghostMode.inputs": "Text inputs (including text-areas) will be synced",
"ghostMode.toggles": "Radio + Checkboxes changes will be synced",
codeSync: "Reload or Inject files when they change"
};
// If watching files, add the code-sync toggle
ctrl.syncItems.push(addItem("codeSync", ["codeSync"], ctrl.options.codeSync, taglines["codeSync"]));
Object.keys(ctrl.options.ghostMode).forEach(function (item) {
if (item !== "forms" && item !== "location") {
ctrl.syncItems.push(addItem(item, ["ghostMode", item], ctrl.options.ghostMode[item], taglines[item]));
}
});
Object.keys(ctrl.options.ghostMode.forms).forEach(function (item) {
ctrl.syncItems.push(addItem("Forms: " + item, ["ghostMode", "forms", item], ctrl.options.ghostMode["forms"][item], taglines["ghostMode." + item]));
});
function addItem (item, path, value, tagline) {
return {
value: value,
name: item,
path: path,
title: ucfirst(item),
tagline: tagline
};
}
}
function ucfirst (string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
})(angular);
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0084 ]-- |