How to use the gui.default_del_action function in gui

To help you get started, we’ve selected a few gui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hadouken / hadouken / src / WebUI / webui.js View on Github external
"remove": function(mode) {
		if (DialogManager.modalIsVisible()) return;

		var count = this.trtTable.selectedRows.length;
		if (count == 0) return;

		mode = parseInt(mode, 10);
		if (isNaN(mode) || mode < 0 || this.delActions.length <= mode)
			mode = this.settings["gui.default_del_action"] || 0;

{ // TODO: Remove this once backend support is stable (requires 3.0+)
	if (undefined === this.settings["webui.uconnect_enable"]) mode &= ~1; // force non-.torrent removal mode
}

		var act = this.perform.bind(this, this.delActions[mode]);

		if ([this.settings["confirm_when_deleting"], true].pick()) {
			var ask;
			switch (mode) {
				case CONST.TOR_REMOVE:
				case CONST.TOR_REMOVE_TORRENT:
					ask = ((count == 1) ? "OV_CONFIRM_DELETE_ONE" : "OV_CONFIRM_DELETE_MULTIPLE");
				break;

				case CONST.TOR_REMOVE_DATA:
github hadouken / hadouken / src / WebUI / webui.js View on Github external
"removeDefault": function(shift) {
		this.remove((this.settings["gui.default_del_action"] || 0) | (shift ? 2 : 0));
	},
github tympanix / Electorrent / app / scripts / app.js View on Github external
removeTorrent: function() {
                var actions = ['remove','removetorrent','removedata','removedatatorrent'];
                var defaultRemove = parseInt(torrentServerService.settingsMap['gui.default_del_action'].value);
                return torrentServerService.actions()[actions[defaultRemove]];
            },
            getFileDownloadUrl: function(torrent,file) {
github psychowood / ng-torrent-ui / app / scripts / services / utorrentservice.js View on Github external
removeTorrent: function() {
                var actions = ['remove','removetorrent','removedata','removedatatorrent'];
                var defaultRemove = parseInt(torrentServerService.settingsMap['gui.default_del_action'].value);
                return torrentServerService.actions()[actions[defaultRemove]];
            },
            getFileDownloadUrl: function(torrent,file) {