new init
0
build/htdocs/dist/packages/.gitignore
vendored
Normal file
BIN
build/htdocs/dist/packages/default/About/about.png
vendored
Normal file
After Width: | Height: | Size: 1.5 KiB |
44
build/htdocs/dist/packages/default/About/combined.css
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
.ApplicationAboutWindow application-window-content {
|
||||
background-color : #fff;
|
||||
color : #000;
|
||||
text-align : center;
|
||||
}
|
||||
.ApplicationAboutWindow application-window-content > div > div {
|
||||
padding : 10px;
|
||||
}
|
||||
.ApplicationAboutWindow h1 {
|
||||
margin : 0;
|
||||
padding : 10px;
|
||||
font-size : 40px;
|
||||
}
|
||||
|
85
build/htdocs/dist/packages/default/About/combined.js
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationAboutWindow(app, metadata, scheme) {
|
||||
Window.apply(this, ['ApplicationAboutWindow', {
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
gravity: 'center',
|
||||
allow_resize: false,
|
||||
allow_maximize: false,
|
||||
width: 320,
|
||||
height: 320,
|
||||
min_width: 320,
|
||||
min_height: 320
|
||||
}, app, scheme]);
|
||||
}
|
||||
|
||||
ApplicationAboutWindow.prototype = Object.create(Window.prototype);
|
||||
ApplicationAboutWindow.constructor = Window.prototype;
|
||||
|
||||
ApplicationAboutWindow.prototype.init = function(wm, app, scheme) {
|
||||
var root = Window.prototype.init.apply(this, arguments);
|
||||
scheme.render(this, 'AboutWindow', root);
|
||||
root.getElementsByTagName('img')[0].src = API.getApplicationResource(app, 'about.png');
|
||||
return root;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationAbout = function(args, metadata) {
|
||||
Application.apply(this, ['ApplicationAbout', args, metadata]);
|
||||
};
|
||||
|
||||
ApplicationAbout.prototype = Object.create(Application.prototype);
|
||||
ApplicationAbout.constructor = Application;
|
||||
|
||||
ApplicationAbout.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.apply(this, arguments);
|
||||
this._addWindow(new ApplicationAboutWindow(this, metadata, scheme));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationAbout = OSjs.Applications.ApplicationAbout || {};
|
||||
OSjs.Applications.ApplicationAbout.Class = Object.seal(ApplicationAbout);
|
||||
|
||||
})(OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
54
build/htdocs/dist/packages/default/About/metadata.json
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"className": "ApplicationAbout",
|
||||
"name": "About OS.js",
|
||||
"description": "About OS.js",
|
||||
"names": {
|
||||
"bg_BG": " За OS.js",
|
||||
"de_DE": "Über OS.js",
|
||||
"fr_FR": "À propos d'OS.js",
|
||||
"it_IT": "Informazioni su OS.js",
|
||||
"ko_KR": "OS.js에 대하여",
|
||||
"nl_NL": "Over OS.js",
|
||||
"no_NO": "Om OS.js",
|
||||
"pl_PL": "o OS.js",
|
||||
"ru_RU": "Об OS.js",
|
||||
"sk_SK": "o OS.js",
|
||||
"tr_TR": "hakkında OS.js",
|
||||
"vi_VN": "Thông tin về OS.js"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "За OS.js",
|
||||
"de_DE": "Über OS.js",
|
||||
"fr_FR": "À propos d'OS.js",
|
||||
"it_IT": "Informazioni su OS.js",
|
||||
"ko_KR": "OS.js에 대하여",
|
||||
"nl_NL": "Over OS.js",
|
||||
"no_NO": "Om OS.js",
|
||||
"pl_PL": "o OS.js",
|
||||
"ru_RU": "Об OS.js",
|
||||
"sk_SK": "o OS.js",
|
||||
"tr_TR": "hakkında OS.js",
|
||||
"vi_VN": "Thông tin về OS.js"
|
||||
},
|
||||
"singular": true,
|
||||
"category": "system",
|
||||
"icon": "apps/help-browser.png",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/About",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
20
build/htdocs/dist/packages/default/About/scheme.html
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
<application-window data-id="AboutWindow">
|
||||
|
||||
<div>
|
||||
<h1>OS.js</h1>
|
||||
|
||||
<div>
|
||||
Created by<br />
|
||||
<a href="http://andersevenrud.github.io" target="_blank">Anders Evenrud</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img alt="" src="" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="https://os.js.org/" target="_blank">Official Homepage</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</application-window>
|
11
build/htdocs/dist/packages/default/Broadway/api.php
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class BroadwayAPIHandler {
|
||||
public static function broadway(Array $arguments) {
|
||||
return Array(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
API::AddHandler('broadway', Array('BroadwayAPIHandler', 'broadway'));
|
||||
|
||||
?>
|
1171
build/htdocs/dist/packages/default/Broadway/broadway.js
vendored
Normal file
19
build/htdocs/dist/packages/default/Broadway/extension.css
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
/*.Window_BroadwayConnectionWindow .WindowWrapper {
|
||||
}
|
||||
|
||||
.Window_BroadwayConnectionWindow .WindowWrapper {
|
||||
}*/
|
||||
|
||||
.Window_BroadwayConnectionWindow .WindowWrapper .supported {
|
||||
color : #33dd33;
|
||||
}
|
||||
|
||||
.Window_BroadwayConnectionWindow .WindowWrapper .unsupported {
|
||||
color : #dd3333;
|
||||
}
|
||||
|
||||
.Window_BroadwayConnectionWindow .WindowWrapper > * {
|
||||
margin : 10px;
|
||||
}
|
||||
|
459
build/htdocs/dist/packages/default/Broadway/extension.js
vendored
Normal file
@ -0,0 +1,459 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Window, Utils, API, GUI) {
|
||||
'use strict';
|
||||
|
||||
var _isConnected = false;
|
||||
var _connWindow = null;
|
||||
var _scheme = null;
|
||||
|
||||
function createConnectionWindow() {
|
||||
if ( _connWindow ) { return; }
|
||||
|
||||
function addWindow() {
|
||||
var wm = OSjs.Core.getWindowManager();
|
||||
if ( wm ) {
|
||||
_connWindow = new BroadwayConnectionWindow(_scheme);
|
||||
wm.addWindow(_connWindow, true);
|
||||
}
|
||||
}
|
||||
|
||||
if ( _scheme ) {
|
||||
addWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
var url = API.getApplicationResource('ExtensionBroadway', 'scheme.html');
|
||||
var scheme = GUI.createScheme(url);
|
||||
scheme.load(function(error, result) {
|
||||
if ( result ) {
|
||||
_scheme = scheme;
|
||||
addWindow();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function destroyConnectionWindow() {
|
||||
if ( _connWindow ) {
|
||||
_connWindow._close();
|
||||
_connWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
function createNotification() {
|
||||
var wm = OSjs.Core.getWindowManager();
|
||||
|
||||
function displayMenu(ev) {
|
||||
var menuItems = [];
|
||||
if ( _isConnected ) {
|
||||
menuItems.push({
|
||||
title: 'Disconnect from Broadway server',
|
||||
onClick: function() {
|
||||
window.GTK.disconnect();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
menuItems.push({
|
||||
title: 'Connect to Broadway server',
|
||||
onClick: function() {
|
||||
createConnectionWindow();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
OSjs.API.createMenu(menuItems, ev);
|
||||
}
|
||||
|
||||
if ( wm ) {
|
||||
removeNotification();
|
||||
|
||||
wm.createNotificationIcon('BroadwayService', {
|
||||
image: API.getIcon('status/network-transmit-receive.png'),
|
||||
onContextMenu: function(ev) {
|
||||
displayMenu(ev);
|
||||
return false;
|
||||
},
|
||||
onClick: function(ev) {
|
||||
displayMenu(ev);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function removeNotification() {
|
||||
var wm = OSjs.Core.getWindowManager();
|
||||
if ( wm ) {
|
||||
wm.removeNotificationIcon('BroadwayService');
|
||||
}
|
||||
}
|
||||
|
||||
function actionOnWindow(id, cb) {
|
||||
var wm = OSjs.Core.getWindowManager();
|
||||
if ( wm ) {
|
||||
var win = wm.getWindow('BroadwayWindow' + id);
|
||||
if ( win ) {
|
||||
return cb(win);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CLIENT WINDOW
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Main Window Constructor
|
||||
*/
|
||||
var BroadwayConnectionWindow = function(scheme) {
|
||||
Window.apply(this, ['BroadwayConnectionWindow', {
|
||||
title: 'Broadway Client',
|
||||
allow_maximize: false,
|
||||
allow_reszie: false,
|
||||
gravity: 'center',
|
||||
width: 400,
|
||||
height: 250
|
||||
}, null, scheme]);
|
||||
};
|
||||
|
||||
BroadwayConnectionWindow.prototype = Object.create(Window.prototype);
|
||||
|
||||
BroadwayConnectionWindow.prototype.init = function(wm, app, scheme) {
|
||||
var root = Window.prototype.init.apply(this, arguments);
|
||||
var self = this;
|
||||
|
||||
var supported = OSjs.Helpers.Broadway ? true : false;
|
||||
var lbl = 'Broadway support is ' + (supported ? 'loaded' : 'not loaded');
|
||||
var ws;
|
||||
|
||||
scheme.render(this, 'ConnectionWindow', root);
|
||||
|
||||
var connectInput = scheme.find(this, 'GtkConnection').set('disabled', !supported);
|
||||
var procConnection = scheme.find(this, 'ProcConnection').set('disabled', !supported);
|
||||
var connectButton = scheme.find(this, 'ConnectButton').set('disabled', !supported);
|
||||
|
||||
var procInput = scheme.find(this, 'StartProc').set('disabled', true);
|
||||
var procButton = scheme.find(this, 'StartButton').set('disabled', true);
|
||||
|
||||
var statusText = scheme.find(this, 'StatusText').set('value', lbl);
|
||||
|
||||
connectButton.on('click', function() {
|
||||
if ( self._destroyed ) { return; }
|
||||
|
||||
if ( ws ) {
|
||||
ws.close();
|
||||
ws = null;
|
||||
}
|
||||
|
||||
ws = new WebSocket(procConnection.get('value'), 'broadway-spawner');
|
||||
ws.onerror = function() {
|
||||
alert('Failed to connect to spawner');
|
||||
};
|
||||
ws.onopen = function() {
|
||||
if ( self._destroyed ) { return; }
|
||||
procButton.set('disabled', false);
|
||||
};
|
||||
ws.onclose = function() {
|
||||
if ( self._destroyed ) { return; }
|
||||
procButton.set('disabled', true);
|
||||
};
|
||||
|
||||
connectButton.set('disabled', true);
|
||||
statusText.set('value', 'Connecting...');
|
||||
|
||||
OSjs.Helpers.Broadway.init(connectInput.get('value'), function(error) {
|
||||
if ( self._destroyed ) { return; }
|
||||
|
||||
if ( error ) {
|
||||
console.warn('BroadwayClient', error);
|
||||
statusText.set('value', error);
|
||||
connectButton.set('disabled', false);
|
||||
} else {
|
||||
procInput.set('disabled', false);
|
||||
connectButton.set('disabled', true);
|
||||
statusText.set('value', 'Connected!');
|
||||
}
|
||||
}, function() {
|
||||
if ( self._destroyed ) { return; }
|
||||
|
||||
statusText.set('value', 'Disconnecting...');
|
||||
connectButton.set('disabled', false);
|
||||
procInput.set('disabled', true);
|
||||
|
||||
if ( ws ) {
|
||||
ws.close();
|
||||
ws = null;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
procButton.on('click', function() {
|
||||
if ( self._destroyed ) { return; }
|
||||
if ( ws ) {
|
||||
ws.send(JSON.stringify({
|
||||
method: 'launch',
|
||||
argument: procInput.get('value')
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
BroadwayConnectionWindow.prototype.destroy = function() {
|
||||
_connWindow = null;
|
||||
return Window.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// BROADWAY WINDOW
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Dialog Window
|
||||
*/
|
||||
var BroadwayWindow = function(id, x, y, w, h) {
|
||||
Window.apply(this, ['BroadwayWindow' + id, {
|
||||
w: w,
|
||||
h: h,
|
||||
title: 'Broadway Window ' + id.toString(),
|
||||
min_width: 100,
|
||||
min_height: 100,
|
||||
allow_resize: false,
|
||||
allow_minimize: false,
|
||||
allow_maximize: false,
|
||||
allow_session: false,
|
||||
key_capture: true // IMPORTANT
|
||||
}]);
|
||||
|
||||
this._broadwayId = id;
|
||||
this._canvas = document.createElement('canvas');
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype = Object.create(Window.prototype);
|
||||
|
||||
BroadwayWindow.prototype.init = function() {
|
||||
var self = this;
|
||||
var root = Window.prototype.init.apply(this, arguments);
|
||||
this._canvas.width = this._dimension.w;
|
||||
this._canvas.height = this._dimension.h;
|
||||
|
||||
|
||||
function getMousePos(ev) {
|
||||
return {
|
||||
x:ev.pageX - self._position.x,
|
||||
y:ev.pageY - self._position.y - 26 // FIXME
|
||||
};
|
||||
}
|
||||
|
||||
function inject(type, ev) {
|
||||
var pos = getMousePos(ev);
|
||||
return window.GTK.inject(self._broadwayId, type, ev, {
|
||||
wx: self._position.x,
|
||||
wy: self._position.y,
|
||||
mx: parseInt(pos.x, 0),
|
||||
my: parseInt(pos.y, 0)
|
||||
});
|
||||
}
|
||||
|
||||
Utils.$bind(root, 'mouseover', function(ev) {
|
||||
return inject('mouseover', ev);
|
||||
});
|
||||
Utils.$bind(root, 'mouseout', function(ev) {
|
||||
return inject('mouseout', ev);
|
||||
});
|
||||
Utils.$bind(root, 'mousemove', function(ev) {
|
||||
return inject('mousemove', ev);
|
||||
});
|
||||
Utils.$bind(root, 'mousedown', function(ev) {
|
||||
return inject('mousedown', ev);
|
||||
});
|
||||
Utils.$bind(root, 'mouseup', function(ev) {
|
||||
return inject('mouseup', ev);
|
||||
});
|
||||
Utils.$bind(root, 'DOMMouseScroll', function(ev) {
|
||||
return inject('mousewheel', ev);
|
||||
});
|
||||
Utils.$bind(root, 'mousewheel', function(ev) {
|
||||
return inject('mousewheel', ev);
|
||||
});
|
||||
|
||||
root.appendChild(this._canvas);
|
||||
return root;
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype.destroy = function() {
|
||||
Window.prototype.destroy.apply(this, arguments);
|
||||
this._canvas = null;
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype._inited = function() {
|
||||
Window.prototype._inited.apply(this, arguments);
|
||||
|
||||
this._onChange('move', true);
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype._close = function() {
|
||||
if ( !Window.prototype._close.apply(this, arguments) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
window.GTK.close(this._broadwayId);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype._resize = function(w, h) {
|
||||
if ( !Window.prototype._resize.apply(this, [w, h, true]) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function resizeCanvas(canvas, w, h) {
|
||||
var tmpCanvas = canvas.ownerDocument.createElement("canvas");
|
||||
tmpCanvas.width = canvas.width;
|
||||
tmpCanvas.height = canvas.height;
|
||||
var tmpContext = tmpCanvas.getContext("2d");
|
||||
tmpContext.globalCompositeOperation = "copy";
|
||||
tmpContext.drawImage(canvas, 0, 0, tmpCanvas.width, tmpCanvas.height);
|
||||
|
||||
canvas.width = w;
|
||||
canvas.height = h;
|
||||
|
||||
var context = canvas.getContext("2d");
|
||||
|
||||
context.globalCompositeOperation = "copy";
|
||||
context.drawImage(tmpCanvas, 0, 0, tmpCanvas.width, tmpCanvas.height);
|
||||
}
|
||||
|
||||
if ( this._canvas ) {
|
||||
resizeCanvas(this._canvas, w, h);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype._onKeyEvent = function(ev, type) {
|
||||
window.GTK.inject(this._broadwayId, type, ev);
|
||||
};
|
||||
|
||||
BroadwayWindow.prototype._onChange = function(ev, byUser) {
|
||||
if ( !byUser ) { return; }
|
||||
|
||||
if ( ev === 'move' ) {
|
||||
window.GTK.move(this._broadwayId, this._position.x, this._position.y);
|
||||
} else if ( ev === 'resize' ) {
|
||||
window.GTK.resize(this._broadwayId, this._dimension.w, this._dimension.h);
|
||||
}
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.API.addHook('onSessionLoaded', function() {
|
||||
createNotification();
|
||||
});
|
||||
OSjs.API.addHook('onLogout', function() {
|
||||
removeNotification();
|
||||
destroyConnectionWindow();
|
||||
});
|
||||
|
||||
OSjs.Helpers.Broadway = {};
|
||||
OSjs.Helpers.Broadway.init = function(host, cb, cbclose) {
|
||||
window.GTK.connect(host, {
|
||||
onSocketOpen: function() {
|
||||
_isConnected = true;
|
||||
createNotification();
|
||||
},
|
||||
|
||||
onSocketClose: function() {
|
||||
_isConnected = false;
|
||||
createNotification();
|
||||
},
|
||||
|
||||
onSetTransient: function(id, parentId, surface) {
|
||||
return actionOnWindow(parentId, function(win) {
|
||||
if ( win._canvas && surface.canvas ) {
|
||||
if ( win._canvas.parentNode ) {
|
||||
win._canvas.parentNode.appendChild(surface.canvas);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onFlushSurface: function(id, q) {
|
||||
return actionOnWindow(id, function(win) {
|
||||
return win._canvas;
|
||||
});
|
||||
},
|
||||
|
||||
onDeleteSurface: function(id) {
|
||||
return actionOnWindow(id, function(win) {
|
||||
return win._close();
|
||||
});
|
||||
},
|
||||
|
||||
onShowSurface: function(id) {
|
||||
return actionOnWindow(id, function(win) {
|
||||
return win._restore();
|
||||
});
|
||||
},
|
||||
|
||||
onHideSurface: function(id) {
|
||||
return actionOnWindow(id, function(win) {
|
||||
return win._minimize();
|
||||
});
|
||||
},
|
||||
|
||||
onMoveSurface: function(id, has_pos, has_size, surface) {
|
||||
return actionOnWindow(id, function(win) {
|
||||
/*
|
||||
if ( has_pos ) {
|
||||
win._move(x, y);
|
||||
}
|
||||
*/
|
||||
if ( has_size ) {
|
||||
win._resize(surface.width, surface.height);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onCreateSurface: function(id, surface) {
|
||||
var wm = OSjs.Core.getWindowManager();
|
||||
var win = new BroadwayWindow(id, surface.x, surface.y, surface.width, surface.height);
|
||||
wm.addWindow(win);
|
||||
return win._canvas;
|
||||
}
|
||||
|
||||
}, cb, cbclose);
|
||||
};
|
||||
|
||||
})(OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.GUI);
|
33
build/htdocs/dist/packages/default/Broadway/metadata.json
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"className": "ExtensionBroadway",
|
||||
"type": "extension",
|
||||
"enabled": false,
|
||||
"config": {},
|
||||
"build": {
|
||||
"copy": [
|
||||
"scheme.html",
|
||||
"metadata.json",
|
||||
"broadway.js",
|
||||
"extension.js",
|
||||
"extension.css",
|
||||
"api.php"
|
||||
]
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "packages/default/Broadway/broadway.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "packages/default/Broadway/extension.css"
|
||||
},
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "packages/default/Broadway/extension.js"
|
||||
}
|
||||
],
|
||||
"path": "default/Broadway",
|
||||
"repo": "default",
|
||||
"preload": []
|
||||
}
|
35
build/htdocs/dist/packages/default/Broadway/scheme.html
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<application-window data-id="ConnectionWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-label>Start new process</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-text data-id="GtkConnection">ws://10.0.0.113:8085/socket-bin</gui-text>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-text data-id="ProcConnection">ws://10.0.0.113:9000</gui-text>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-button data-id="ConnectButton">Connect</gui-button>
|
||||
</gui-vbox-container>
|
||||
|
||||
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-label>Start new process</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-text data-id="StartProc">/usr/bin/gtk3-demo</gui-text>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-basis="auto" data-expand="true">
|
||||
<gui-button data-id="StartButton">Launch</gui-button>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto" data-expand="true">
|
||||
<gui-statusbar data-id="Statusbar">
|
||||
<gui-label data-id="StatusText">Checking broadway support...</gui-label>
|
||||
</gui-statusbar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
142
build/htdocs/dist/packages/default/Calculator/combined.css
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationCalculatorWindow {
|
||||
}*/
|
||||
|
||||
.ApplicationCalculatorWindow gui-text {
|
||||
display : block;
|
||||
margin : 8px;
|
||||
height : 50px;
|
||||
}
|
||||
|
||||
.ApplicationCalculatorWindow gui-text > input {
|
||||
font-size : 30px;
|
||||
font-family : Monospace;
|
||||
line-height : 50px;
|
||||
text-align : right;
|
||||
}
|
||||
|
||||
.ApplicationCalculatorWindow.noop {
|
||||
opacity : .1;
|
||||
}
|
||||
|
||||
.ApplicationCalculatorWindow.NaN {
|
||||
-webkit-animation:CalculatorSuck 3s linear;
|
||||
-moz-animation:CalculatorSuck 3s linear;
|
||||
-ms-animation:CalculatorSuck 3s linear;
|
||||
-o-animation:CalculatorSuck 3s linear;
|
||||
animation:CalculatorSuck 3s linear;
|
||||
}
|
||||
|
||||
@-webkit-keyframes CalculatorSuck {
|
||||
100% {
|
||||
-webkit-transform: scale(0) rotate(360deg);
|
||||
transform: scale(0) rotate(360deg);
|
||||
-webkit-opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: scale(.5) rotate(180deg);
|
||||
transform: scale(.5) rotate(180deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
-webkit-transform: scale(1.5) rotate(0deg);
|
||||
transform: scale(1.5) rotate(0deg);
|
||||
}
|
||||
|
||||
0% {
|
||||
-webkit-opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-moz-keyframes CalculatorSuck {
|
||||
100% {
|
||||
-moz-transform: scale(0) rotate(360deg);
|
||||
transform: scale(0) rotate(360deg);
|
||||
-moz-opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
-moz-transform: scale(.5) rotate(180deg);
|
||||
transform: scale(.5) rotate(180deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
-moz-transform: scale(1.5) rotate(0deg);
|
||||
transform: scale(1.5) rotate(0deg);
|
||||
}
|
||||
|
||||
0% {
|
||||
-moz-opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes CalculatorSuck {
|
||||
100% {
|
||||
-o-transform: scale(0) rotate(360deg);
|
||||
transform: scale(0) rotate(360deg);
|
||||
-o-opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
-o-transform: scale(.5) rotate(180deg);
|
||||
transform: scale(.5) rotate(180deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
-o-transform: scale(1.5) rotate(0deg);
|
||||
transform: scale(1.5) rotate(0deg);
|
||||
}
|
||||
|
||||
0% {
|
||||
-o-opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes CalculatorSuck {
|
||||
100% {
|
||||
transform: scale(0) rotate(360deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(.5) rotate(180deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
transform: scale(1.5) rotate(0deg);
|
||||
}
|
||||
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
256
build/htdocs/dist/packages/default/Calculator/combined.js
vendored
Normal file
@ -0,0 +1,256 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Application, Window, Utils, API, VFS, GUI) {
|
||||
/*eslint eqeqeq: "off"*/
|
||||
'use strict';
|
||||
|
||||
var ops = {
|
||||
dec : '.',
|
||||
perc : '%',
|
||||
minus : '-',
|
||||
plus : '+',
|
||||
multiply : '*',
|
||||
divide : '/'
|
||||
};
|
||||
|
||||
var keys = {
|
||||
107: 'plus',
|
||||
109: 'minus',
|
||||
106: 'multiply',
|
||||
111: 'divide',
|
||||
110: 'dec',
|
||||
188: 'dec',
|
||||
13: 'equal',
|
||||
47: 'divide',
|
||||
46: 'CE',
|
||||
45: 'minus',
|
||||
44: 'dec',
|
||||
43: 'plus',
|
||||
42: 'multiply',
|
||||
27: 'CE',
|
||||
8: 'nbs'
|
||||
};
|
||||
|
||||
var labels = {
|
||||
'CE' : 'CE', 'AC' : 'AC', 'perc' : '%', 'plus' : '+',
|
||||
'7' : '7', '8' : '8', '9' : '9', 'minus' : '-',
|
||||
'4' : '4', '5' : '5', '6' : '6', 'multiply' : 'x',
|
||||
'1' : '1', '2' : '2', '3' : '3', 'divide' : '÷',
|
||||
'0' : '0', 'swap': '±', 'dec' : ',', 'equal' : '='
|
||||
};
|
||||
|
||||
var buttons = [
|
||||
['CE', 'AC', 'perc', 'plus'],
|
||||
['7', '8', '9', 'minus'],
|
||||
['4', '5', '6', 'multiply'],
|
||||
['1', '2', '3', 'divide'],
|
||||
['0', 'dec', 'equal']
|
||||
];
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationCalculatorWindow(app, metadata, scheme) {
|
||||
Window.apply(this, ['ApplicationCalculatorWindow', {
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
allow_resize: false,
|
||||
allow_maximize: false,
|
||||
width: 220,
|
||||
height: 340
|
||||
}, app, scheme]);
|
||||
|
||||
this.total = 0;
|
||||
this.entries = [];
|
||||
this.temp = '';
|
||||
}
|
||||
|
||||
ApplicationCalculatorWindow.prototype = Object.create(Window.prototype);
|
||||
ApplicationCalculatorWindow.constructor = Window.prototype;
|
||||
|
||||
ApplicationCalculatorWindow.prototype.init = function(wm, app, scheme) {
|
||||
var root = Window.prototype.init.apply(this, arguments);
|
||||
var self = this;
|
||||
|
||||
// Load and gel.set up scheme (GUI) here
|
||||
scheme.render(this, 'CalculatorWindow', root);
|
||||
|
||||
this._scheme.find(this, 'Output').on('keypress', function(ev) {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
||||
var keyCode = ev.which || ev.keyCode;
|
||||
if ( (keyCode > 95) && (keyCode < 106) ) {
|
||||
self.operation(keyCode - 96);
|
||||
} else if ( (keyCode > 47) && (keyCode < 58) ) {
|
||||
self.operation(keyCode - 48);
|
||||
} else {
|
||||
if ( typeof keys[keyCode] !== 'undefined' ) {
|
||||
self.operation(keys[keyCode]);
|
||||
}
|
||||
}
|
||||
}).set('readonly', true).focus();
|
||||
|
||||
root.querySelectorAll('gui-button').forEach(function(el, idx) {
|
||||
var r = parseInt(idx / 4, 10);
|
||||
var c = idx % 4;
|
||||
var op = buttons[r][c];
|
||||
|
||||
el = scheme.get(el);
|
||||
el.set('value', labels[op] || '');
|
||||
if ( op === null ) {
|
||||
Utils.$addClass(el.$element, 'noop');
|
||||
el.set('disabled', true);
|
||||
} else {
|
||||
el.on('click', function() {
|
||||
self.operation(op);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationCalculatorWindow.prototype.operation = function(val) {
|
||||
var self = this;
|
||||
|
||||
if (this.temp == '' && ['plus', 'minus', 'multiply', 'divide'].indexOf(val) !== -1) {
|
||||
this.temp = this._scheme.find(this, 'Output').get('value');
|
||||
}
|
||||
|
||||
function getAnswer() {
|
||||
var nt = Number(self.entries[0]);
|
||||
|
||||
for ( var i = 1; i < self.entries.length; i++ ) {
|
||||
var nextNum = Number(self.entries[i + 1]);
|
||||
var symbol = self.entries[i];
|
||||
if (symbol === '+') {
|
||||
nt += nextNum;
|
||||
} else if ( symbol === '-' ) {
|
||||
nt -= nextNum;
|
||||
} else if ( symbol === '*' ) {
|
||||
nt *= nextNum;
|
||||
} else if ( symbol === '/' ) {
|
||||
nt /= nextNum;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if ( nt < 0 ) {
|
||||
nt = '-' + Math.abs(nt);
|
||||
}
|
||||
|
||||
return nt;
|
||||
}
|
||||
|
||||
var output = (function() {
|
||||
// Kudos http://codepen.io/GeoffStorbeck/pen/zxgaqw
|
||||
|
||||
if ( !isNaN(val) || val === 'dec' ) { // Number
|
||||
self.temp += val === 'dec' ? ops[val] : val;
|
||||
|
||||
return self.temp.substring(0,10);
|
||||
} else if ( val === 'AC' ) { // Clear
|
||||
self.entries = [];
|
||||
self.temp = '';
|
||||
self.total = 0;
|
||||
|
||||
return '';
|
||||
} else if ( val === 'CE' ) { // Clear Last Entry
|
||||
self.temp = '';
|
||||
|
||||
return '';
|
||||
} else if ( val === 'equal' ) { // Equal
|
||||
self.entries.push(self.temp);
|
||||
|
||||
var nt = getAnswer();
|
||||
self.entries = [];
|
||||
self.temp = '';
|
||||
|
||||
return nt;
|
||||
} else {
|
||||
if ( typeof ops[val] !== 'undefined' ) {
|
||||
val = ops[val];
|
||||
}
|
||||
|
||||
self.entries.push(self.temp);
|
||||
self.entries.push(val);
|
||||
self.temp = '';
|
||||
}
|
||||
|
||||
return null;
|
||||
})();
|
||||
|
||||
if ( output !== null ) {
|
||||
if ( !String(output).length ) {
|
||||
output = String(0);
|
||||
}
|
||||
|
||||
if ( output === 'NaN' || output === 'Infinity' || isNaN(output) || !isFinite(output) ) {
|
||||
Utils.$addClass(this._$element, 'NaN');
|
||||
|
||||
setTimeout(function() {
|
||||
Utils.$removeClass(self._$element, 'NaN');
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
this._scheme.find(this, 'Output').set('value', String(output));
|
||||
}
|
||||
|
||||
this._scheme.find(this, 'Output').focus();
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationCalculator = function(args, metadata) {
|
||||
Application.apply(this, ['ApplicationCalculator', args, metadata]);
|
||||
};
|
||||
|
||||
ApplicationCalculator.prototype = Object.create(Application.prototype);
|
||||
ApplicationCalculator.constructor = Application;
|
||||
|
||||
ApplicationCalculator.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.apply(this, arguments);
|
||||
|
||||
this._addWindow(new ApplicationCalculatorWindow(this, metadata, scheme));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationCalculator = OSjs.Applications.ApplicationCalculator || {};
|
||||
OSjs.Applications.ApplicationCalculator.Class = Object.seal(ApplicationCalculator);
|
||||
|
||||
})(OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
37
build/htdocs/dist/packages/default/Calculator/metadata.json
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"className": "ApplicationCalculator",
|
||||
"name": "Calculator",
|
||||
"names": {
|
||||
"bg_Bg": "Клакулатор",
|
||||
"fr_FR": "Calculatrice",
|
||||
"it_IT": "Calcolatrice",
|
||||
"ko_KR": "계산기",
|
||||
"nl_NL": "Rekenmachine",
|
||||
"no_NO": "Kalkulator",
|
||||
"pl_PL": "Kalkulator",
|
||||
"ru_RU": "Калькулятор",
|
||||
"sk_SK": "Kalkulačka",
|
||||
"tr_TR": "Hesap Makinesi",
|
||||
"vi_VN": "Máy tính"
|
||||
},
|
||||
"icon": "apps/calc.png",
|
||||
"category": "office",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Calculator",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
87
build/htdocs/dist/packages/default/Calculator/scheme.html
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
<application-window data-id="CalculatorWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-text data-id="Output">0</gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-grid>
|
||||
<gui-grid-row>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
</gui-grid-row>
|
||||
|
||||
<gui-grid-row>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
</gui-grid-row>
|
||||
|
||||
<gui-grid-row>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
</gui-grid-row>
|
||||
|
||||
<gui-grid-row>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
</gui-grid-row>
|
||||
|
||||
<gui-grid-row>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry>
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
<gui-grid-entry style="flex:2 0 auto;">
|
||||
<gui-button data-id="ButtonX">X</gui-button>
|
||||
</gui-grid-entry>
|
||||
</gui-grid-row>
|
||||
</gui-grid>
|
||||
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
225
build/htdocs/dist/packages/default/CoreWM/animations.css
vendored
Normal file
@ -0,0 +1,225 @@
|
||||
|
||||
/* Animations */
|
||||
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
|
||||
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
|
||||
@-o-keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
|
||||
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
|
||||
|
||||
@-webkit-keyframes fadeOut { from { opacity:1; } to { opacity:0; } }
|
||||
@-moz-keyframes fadeOut { from { opacity:1; } to { opacity:0; } }
|
||||
@-o-keyframes fadeOut { from { opacity:1; } to { opacity:0; } }
|
||||
@keyframes fadeOut { from { opacity:1; } to { opacity:0; } }
|
||||
|
||||
@-webkit-keyframes windowloadinganim {
|
||||
to {
|
||||
-webkit-transform: rotate( 180deg );
|
||||
}
|
||||
}
|
||||
@-moz-keyframes windowloadinganim {
|
||||
to {
|
||||
-moz-transform: rotate( 180deg );
|
||||
}
|
||||
}
|
||||
@-o-keyframes windowloadinganim {
|
||||
to {
|
||||
-o-transform: rotate( 180deg );
|
||||
}
|
||||
}
|
||||
@keyframes windowloadinganim {
|
||||
to {
|
||||
transform: rotate( 180deg );
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes show {
|
||||
50% { -webkit-transform: scale(1.03); }
|
||||
}
|
||||
@-moz-keyframes show {
|
||||
50% { -moz-transform: scale(1.03); }
|
||||
}
|
||||
@keyframes show {
|
||||
50% { transform: scale(1.03); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes hide {
|
||||
50% { -webkit-transform: scale(0.97); }
|
||||
100% { opacity: 0; -webkit-transform: scale(0.90); }
|
||||
}
|
||||
@-moz-keyframes hide {
|
||||
50% { -moz-transform: scale(0.97); }
|
||||
100% { opacity: 0; -moz-transform: scale(0.90); }
|
||||
}
|
||||
@keyframes hide {
|
||||
50% { transform: scale(0.97); }
|
||||
100% { opacity: 0; transform: scale(0.90); }
|
||||
}
|
||||
|
||||
@-webkit-keyframes pulse {
|
||||
0% {-webkit-transform: scale(0.95); opacity: 0;}
|
||||
8% {-webkit-transform: scale(1.0); opacity: 0;}
|
||||
15% {-webkit-transform: scale(1.001); opacity: 1;}
|
||||
30% {-webkit-transform: scale(1.005); opacity: 1;}
|
||||
100% {opacity: 0; -webkit-transform: scale(1);}
|
||||
}
|
||||
@-moz-keyframes pulse {
|
||||
0% {-moz-transform: scale(0.95); opacity: 0;}
|
||||
8% {-moz-transform: scale(1.0); opacity: 0;}
|
||||
15% {-moz-transform: scale(1.001); opacity: 1;}
|
||||
30% {-moz-transform: scale(1.005); opacity: 1;}
|
||||
100% {opacity: 0; -moz-transform: scale(1);}
|
||||
}
|
||||
@keyframes pulse {
|
||||
0% {transform: scale(0.95); opacity: 0;}
|
||||
8% {transform: scale(1.0); opacity: 0;}
|
||||
15% {transform: scale(1.001); opacity: 1;}
|
||||
30% {transform: scale(1.005); opacity: 1;}
|
||||
100% {opacity: 0; transform: scale(1);}
|
||||
}
|
||||
|
||||
@-webkit-keyframes pulseback {
|
||||
50% { opacity: .35; }
|
||||
}
|
||||
@-moz-keyframes pulseback {
|
||||
50% { opacity: .35; }
|
||||
}
|
||||
@keyframes pulseback {
|
||||
50% { opacity: .35; }
|
||||
}
|
||||
|
||||
@-webkit-keyframes attention {
|
||||
0% { -webkit-transform: scale(1); }
|
||||
30% { -webkit-transform: scale(1); }
|
||||
40% { -webkit-transform: scale(1.02); }
|
||||
50% { -webkit-transform: scale(1); }
|
||||
60% { -webkit-transform: scale(1); }
|
||||
70% { -webkit-transform: scale(1.005); }
|
||||
80% { -webkit-transform: scale(1); }
|
||||
100% { -webkit-transform: scale(1); }
|
||||
}
|
||||
@-moz-keyframes attention {
|
||||
0% { -moz-transform: scale(1); }
|
||||
30% { -moz-transform: scale(1); }
|
||||
40% { -moz-transform: scale(1.02); }
|
||||
50% { -moz-transform: scale(1); }
|
||||
60% { -moz-transform: scale(1); }
|
||||
70% { -moz-transform: scale(1.005); }
|
||||
80% { -moz-transform: scale(1); }
|
||||
100% { -moz-transform: scale(1); }
|
||||
}
|
||||
@keyframes attention {
|
||||
0% { transform: scale(1); }
|
||||
30% { transform: scale(1); }
|
||||
40% { transform: scale(1.02); }
|
||||
50% { transform: scale(1); }
|
||||
60% { transform: scale(1); }
|
||||
70% { transform: scale(1.005); }
|
||||
80% { transform: scale(1); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
|
||||
/* Windows */
|
||||
application-window {
|
||||
-webkit-animation: show .3s;
|
||||
-moz-animation: show .3s;
|
||||
-ms-animation: show .3s;
|
||||
animation: show .3s;
|
||||
|
||||
-webkit-transition: height 0.3s ease-in-out, width 0.3s, top 0.3s, left 0.3s;
|
||||
-moz-transition: height 0.3s ease-in-out, width 0.3s, top 0.3s, left 0.3s;
|
||||
-ms-transition: height 0.3s ease-in-out, width 0.3s, top 0.3s, left 0.3s;
|
||||
-o-transition: height 0.3s ease-in-out, width 0.3s, top 0.3s, left 0.3s;
|
||||
transition: height 0.3s ease-in-out, width 0.3s, top 0.3s, left 0.3s;
|
||||
}
|
||||
application-window[data-hint="resizing"],
|
||||
application-window[data-hint="moving"] {
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-ms-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
application-window[data-hint="closing"],
|
||||
application-window[data-minimized="true"] {
|
||||
-webkit-animation: hide .3s;
|
||||
-moz-animation: hide .3s;
|
||||
-ms-animation: hide .3s;
|
||||
animation: hide .3s;
|
||||
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
-moz-animation-fill-mode: forwards;
|
||||
-ms-animation-fill-mode: forwards;
|
||||
-o-animation-fill-mode: forwards;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
.WindowDropRect {
|
||||
-webkit-animation: pulse 2s linear infinite;
|
||||
-moz-animation: pulse 2s linear infinite;
|
||||
-ms-animation: pulse 2s linear infinite;
|
||||
animation: pulse 2s linear infinite;
|
||||
|
||||
border-image: initial;
|
||||
}
|
||||
|
||||
.WindowAttentionBlink {
|
||||
-webkit-animation: attention 2s linear infinite;
|
||||
-moz-animation: attention 2s linear infinite;
|
||||
-ms-animation: attention 2s linear infinite;
|
||||
animation: attention 2s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
/* Desktop */
|
||||
body[data-attention="true"]:after {
|
||||
position : absolute;
|
||||
top : 0;
|
||||
left : 0;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
opacity : 0;
|
||||
|
||||
-webkit-animation: pulseback 2s linear infinite;
|
||||
-moz-animation: pulseback 2s linear infinite;
|
||||
-ms-animation: pulseback 2s linear infinite;
|
||||
animation: pulseback 2s linear infinite;
|
||||
}
|
||||
|
||||
/* Panel */
|
||||
corewm-panel {
|
||||
-webkit-transition: all .3s ease-in-out;
|
||||
-moz-transition: all .3s ease-in-out;
|
||||
-ms-transition: all .3s ease-in-out;
|
||||
-o-transition: all .3s ease-in-out;
|
||||
transition: all .3s ease-in-out;
|
||||
}
|
||||
|
||||
corewm-panel .Button.Attention {
|
||||
-webkit-animation: attention 2s linear infinite;
|
||||
-moz-animation: attention 2s linear infinite;
|
||||
-ms-animation: attention 2s linear infinite;
|
||||
animation: attention 2s linear infinite;
|
||||
}
|
||||
|
||||
/* Menus */
|
||||
gui-menu,
|
||||
corewm-notification-entry {
|
||||
-webkit-animation: fadeIn .3s;
|
||||
-moz-animation: fadeIn .3s;
|
||||
-ms-animation: fadeIn .3s;
|
||||
animation: fadeIn .3s;
|
||||
}
|
||||
gui-menu[data-hint="closing"],
|
||||
corewm-notification[data-hint="closing"] {
|
||||
-webkit-animation: fadeOut .3s;
|
||||
-moz-animation: fadeOut .3s;
|
||||
-ms-animation: fadeOut .3s;
|
||||
animation: fadeOut .3s;
|
||||
|
||||
-webkit-animation-fill-mode: forwards;
|
||||
-moz-animation-fill-mode: forwards;
|
||||
-ms-animation-fill-mode: forwards;
|
||||
-o-animation-fill-mode: forwards;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
672
build/htdocs/dist/packages/default/CoreWM/combined.css
vendored
Normal file
@ -0,0 +1,672 @@
|
||||
application-window-top .WindowFrost {
|
||||
position : absolute;
|
||||
top : 0;
|
||||
left : 0;
|
||||
width : 100%;
|
||||
height : 100%;
|
||||
-webkit-filter : blur(4px);
|
||||
opacity : .5;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default Wallpaper stuff
|
||||
*/
|
||||
body[data-background-style="color"] {
|
||||
background-image : none;
|
||||
}
|
||||
body[data-background-style="default"] {
|
||||
background-repeat : repeat;
|
||||
}
|
||||
body[data-background-style="normal"] {
|
||||
background-repeat : no-repeat;
|
||||
}
|
||||
body[data-background-style="center"] {
|
||||
background-repeat : no-repeat;
|
||||
background-position : center center;
|
||||
}
|
||||
body[data-background-style="fill"] {
|
||||
background-repeat : no-repeat;
|
||||
background-size : cover;
|
||||
background-position : center center;
|
||||
/*
|
||||
background-attachment : fixed;
|
||||
*/
|
||||
}
|
||||
body[data-background-style="strech"] {
|
||||
background-repeat : no-repeat;
|
||||
background-size : 100% auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* NOTIFICATIONS
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
corewm-notifications {
|
||||
position : absolute;
|
||||
top : 0;
|
||||
right : 0;
|
||||
z-index : 10000000;
|
||||
width : 400px;
|
||||
}
|
||||
|
||||
corewm-notification {
|
||||
display : block;
|
||||
position : relative;
|
||||
min-height : 10px;
|
||||
overflow : hidden;
|
||||
white-space : nowrap;
|
||||
}
|
||||
corewm-notification.HasIcon {
|
||||
min-height : 32px;
|
||||
}
|
||||
corewm-notification.HasIcon img {
|
||||
position : absolute;
|
||||
}
|
||||
corewm-notification.HasIcon .Title,
|
||||
corewm-notification.HasIcon .Message {
|
||||
margin-left : 32px;
|
||||
padding-left : 5px;
|
||||
white-space: -moz-pre-wrap;
|
||||
white-space: -o-pre-wrap;
|
||||
white-space: -pre-wrap;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
corewm-notification:before {
|
||||
content : '';
|
||||
position : absolute;
|
||||
top : 0;
|
||||
left : 0;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
z-index : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* WINDOW SWITCHER
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
corewm-window-switcher {
|
||||
display : block;
|
||||
position : absolute;
|
||||
top : 50%;
|
||||
left : 50%;
|
||||
width : 256px;
|
||||
z-index : 999999;
|
||||
overflow : hidden;
|
||||
margin-left : -128px;
|
||||
}
|
||||
corewm-window-switcher > div {
|
||||
width : 256px;
|
||||
height : 32px;
|
||||
line-height : 32px;
|
||||
overflow : hidden;
|
||||
}
|
||||
corewm-window-switcher > div > img {
|
||||
vertical-align : middle;
|
||||
margin-right : 5px;
|
||||
margin-left : 5px;
|
||||
width : 16px;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* ICON VIEW
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
#CoreWMDesktopIconView {
|
||||
background : transparent !important;
|
||||
position : absolute;
|
||||
top : 10px;
|
||||
left : 10px;
|
||||
right : 10px;
|
||||
bottom : 10px;
|
||||
z-index : 1;
|
||||
border : 0 none !important;
|
||||
box-shadow : none !important;
|
||||
pointer-events : none;
|
||||
box-sizing : border-box;
|
||||
}
|
||||
|
||||
#CoreWMDesktopIconView gui-icon-view-entry {
|
||||
pointer-events : all;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* APPLICATION MENU
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
#CoreWMApplicationMenu {
|
||||
z-index : 9999999999;
|
||||
position : absolute;
|
||||
left : 5%;
|
||||
right : 5%;
|
||||
top : 5% !important;
|
||||
bottom : 5%;
|
||||
width : 90%;
|
||||
height : 90%;
|
||||
overflow-x : hidden;
|
||||
overflow-y : auto;
|
||||
padding : 0;
|
||||
margin : 0;
|
||||
background : transparent;
|
||||
border : 0 none;
|
||||
box-shadow : none;
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
#CoreWMApplicationMenu:before {
|
||||
z-index : -1;
|
||||
position : fixed;
|
||||
top : 0;
|
||||
left : 0;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
overflow : hidden;
|
||||
background : rgba(0, 0, 0, .8);
|
||||
content : '';
|
||||
}
|
||||
|
||||
#CoreWMApplicationMenu gui-menu-entry {
|
||||
width : 84px;
|
||||
height : 84px;
|
||||
padding : 4px;
|
||||
display : inline-block;
|
||||
overflow : hidden;
|
||||
line-height : 16px;
|
||||
position : relative;
|
||||
box-sizing : border-box;
|
||||
text-align : center;
|
||||
}
|
||||
|
||||
#CoreWMApplicationMenu gui-menu-entry img {
|
||||
margin-top : 5px;
|
||||
width : 32px;
|
||||
height : 32px;
|
||||
}
|
||||
|
||||
#CoreWMApplicationMenu gui-menu-entry div {
|
||||
white-space : normal;
|
||||
max-height : 30px;
|
||||
box-sizing : border-box;
|
||||
margin-top : 5px;
|
||||
color : #fff;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* PANELS
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
corewm-panel {
|
||||
display : block;
|
||||
position : absolute;
|
||||
overflow : hidden;
|
||||
z-index : 2;
|
||||
margin : 0;
|
||||
box-sizing : border-box;
|
||||
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
min-width : 16px;
|
||||
min-height : 16px;
|
||||
}
|
||||
|
||||
corewm-panel[data-orientation="horizontal"] {
|
||||
top : 0;
|
||||
left : 0;
|
||||
right : 0;
|
||||
}
|
||||
corewm-panel[data-orientation="horizontal"] corewm-panel-item {
|
||||
height : 100%;
|
||||
}
|
||||
corewm-panel[data-orientation="horizontal"] corewm-panel-container {
|
||||
width : 100%;
|
||||
min-height : 16px;
|
||||
height : 16px;
|
||||
}
|
||||
corewm-panel[data-orientation="horizontal"] .corewm-panel-buttons {
|
||||
height : 100%;
|
||||
}
|
||||
corewm-panel[data-orientation="horizontal"] .corewm-panel-buttons > li {
|
||||
height : 100%;
|
||||
}
|
||||
|
||||
corewm-panel[data-orientation="horizontal"] .corewm-panel-buttons > li > img {
|
||||
height : 100%;
|
||||
width : auto;
|
||||
}
|
||||
|
||||
corewm-panel[data-orientation="vertical"] {
|
||||
left : 0;
|
||||
bottom : 0;
|
||||
top : 0;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] corewm-panel-item {
|
||||
width : 100%;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] corewm-panel-container {
|
||||
height : 100%;
|
||||
min-width : 16px;
|
||||
width : 16px;
|
||||
flex-direction : column;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .corewm-panel-buttons {
|
||||
flex-direction : column;
|
||||
width : 100%;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .corewm-panel-buttons > li {
|
||||
max-width : 100%;
|
||||
width : 100%;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .corewm-panel-buttons > li > span {
|
||||
transform : rotate(90deg);
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .corewm-panel-buttons > li > img {
|
||||
width : 100%;
|
||||
height : auto;
|
||||
}
|
||||
|
||||
corewm-panel:before {
|
||||
content : '';
|
||||
display : block;
|
||||
position : absolute;
|
||||
top : 0;
|
||||
left : 0;
|
||||
right : 0;
|
||||
bottom : 0;
|
||||
z-index : 1;
|
||||
}
|
||||
|
||||
corewm-panel[data-ontop="true"] {
|
||||
z-index : 9999998;
|
||||
}
|
||||
corewm-panel[data-position="bottom"] {
|
||||
top : auto;
|
||||
bottom : 0;
|
||||
}
|
||||
corewm-panel[data-autohide="true"] {
|
||||
height : 0;
|
||||
}
|
||||
corewm-panel[data-autohide="true"] > * {
|
||||
visibility : hidden;
|
||||
}
|
||||
|
||||
corewm-panel-container {
|
||||
position : relative;
|
||||
z-index : 10;
|
||||
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
|
||||
justify-content: center;
|
||||
|
||||
-ms-flex-align: center;
|
||||
|
||||
-webkit-align-items: center;
|
||||
-moz-align-items: center;
|
||||
align-items: center;
|
||||
|
||||
-webkit-box-align: center;
|
||||
-moz-box-align: center;
|
||||
-ms-box-align: center;
|
||||
-o-box-align: center;
|
||||
box-align: center;
|
||||
|
||||
-webkit-flex-wrap: nowrap;
|
||||
-moz-flex-wrap: nowrap;
|
||||
-ms-flex-wrap: nowrap;
|
||||
-o-flex-wrap: nowrap;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
corewm-panel-item {
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
|
||||
box-sizing : border-box;
|
||||
|
||||
-webkit-flex: 0 0 auto;
|
||||
-moz-flex: 0 0 auto;
|
||||
-ms-flex: 0 0 auto;
|
||||
-o-flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
corewm-panel-container > .corewm-panel-expand {
|
||||
-webkit-flex: 1 1 auto;
|
||||
-moz-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
-o-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
corewm-panel-container > .corewm-panel-right {
|
||||
-webkit-justify-content : flex-end;
|
||||
-moz-justify-content : flex-end;
|
||||
-ms-justify-content : flex-end;
|
||||
-o-justify-content : flex-end;
|
||||
justify-content : flex-end;
|
||||
}
|
||||
|
||||
corewm-panel-item .corewm-panel-buttons {
|
||||
list-style : none;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
position : relative;
|
||||
z-index : 10;
|
||||
box-sizing : border-box;
|
||||
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
|
||||
-ms-flex-align: center;
|
||||
|
||||
-webkit-align-items: center;
|
||||
-moz-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
corewm-panel-item .corewm-panel-buttons > li {
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
box-sizing : border-box;
|
||||
position : relative;
|
||||
min-width : 16px;
|
||||
min-height : 16px;
|
||||
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
|
||||
-webkit-flex: 1 1 auto;
|
||||
-moz-flex: 1 1 auto;
|
||||
-ms-flex: 1 1 auto;
|
||||
-o-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
|
||||
|
||||
justify-content: center;
|
||||
|
||||
-ms-flex-align: center;
|
||||
|
||||
-webkit-align-items: center;
|
||||
-moz-align-items: center;
|
||||
align-items: center;
|
||||
|
||||
-webkit-box-align: center;
|
||||
-moz-box-align: center;
|
||||
}
|
||||
corewm-panel-item .corewm-panel-buttons:first-child {
|
||||
margin-right : 0;
|
||||
margin-top : 0;
|
||||
}
|
||||
corewm-panel-item .corewm-panel-buttons:last-child {
|
||||
margin-right : 0;
|
||||
margin-bottom : 0;
|
||||
}
|
||||
corewm-panel-item .corewm-panel-buttons > li > img {
|
||||
display : inline-block;
|
||||
}
|
||||
|
||||
corewm-panel-item .corewm-panel-buttons > li > img,
|
||||
corewm-panel-item .corewm-panel-buttons > li > span {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
corewm-panel-item .Ghost {
|
||||
background-color : red !important;
|
||||
min-width : 16px;
|
||||
}
|
||||
|
||||
.corewm-panel-dummy {
|
||||
min-width : 16px;
|
||||
min-height : 16px;
|
||||
}
|
||||
.corewm-panel-ellipsis span {
|
||||
display : inline-block;
|
||||
overflow : hidden;
|
||||
white-space : nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* SEARCH
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
corewm-search {
|
||||
position : absolute;
|
||||
display : none;
|
||||
z-index : 99999;
|
||||
max-width : 400px;
|
||||
}
|
||||
corewm-search:before {
|
||||
position : absolute;
|
||||
top : 0;
|
||||
left : 0;
|
||||
bottom : 0;
|
||||
right : 0;
|
||||
z-index : -1;
|
||||
}
|
||||
corewm-search[data-visible=true] {
|
||||
display : block;
|
||||
}
|
||||
corewm-search > div {
|
||||
margin-top : 5px;
|
||||
}
|
||||
corewm-search gui-text {
|
||||
width : 100%;
|
||||
}
|
||||
|
||||
corewm-search > ul {
|
||||
list-style-type : none;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
}
|
||||
corewm-search > ul > li {
|
||||
position : relative;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
}
|
||||
corewm-search > ul > li > * {
|
||||
pointer-events : none;
|
||||
}
|
||||
corewm-search > ul > li > img {
|
||||
position : absolute;
|
||||
top : 5px;
|
||||
left : 5px;
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* PANEL ITEMS
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
corewm-panel .PanelItemClock {
|
||||
flex : 0 0 55px;
|
||||
}
|
||||
corewm-panel .PanelItemClock li {
|
||||
cursor : default;
|
||||
}
|
||||
corewm-panel .PanelItemWindowList li > span {
|
||||
max-width : 200px;
|
||||
}
|
||||
|
||||
corewm-panel[data-orientation="horizontal"] .PanelItemWindowList li {
|
||||
-webkit-flex: 0 0 auto;
|
||||
-moz-flex: 0 0 auto;
|
||||
-ms-flex: 0 0 auto;
|
||||
-o-flex: 0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .PanelItemWindowList li {
|
||||
-ms-flex-align: flex-start;
|
||||
|
||||
-webkit-align-items: flex-start;
|
||||
-moz-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
corewm-panel[data-orientation="vertical"] .PanelItemWindowList li > img {
|
||||
transform : rotate(90deg);
|
||||
}
|
||||
corewm-panel[data-orientation="vertical"] .PanelItemWindowList li > span {
|
||||
position: absolute;
|
||||
left: .5em;
|
||||
top: 20px;
|
||||
transform-origin: left;
|
||||
}
|
||||
|
||||
corewm-panel .PanelItemNotificationArea .BusyNotification > div,
|
||||
corewm-panel .PanelItemNotificationArea .StartupNotification > div {
|
||||
cursor : help;
|
||||
width : 20px;
|
||||
}
|
||||
|
||||
corewm-panel .PanelItemNotificationArea .BusyNotification > div > div,
|
||||
corewm-panel .PanelItemNotificationArea .StartupNotification > div > div {
|
||||
border: 2px solid #fff;
|
||||
border-radius: 100%;
|
||||
margin-left : -10px;
|
||||
margin-top : -10px;
|
||||
position : absolute;
|
||||
top : 50%;
|
||||
left : 50%;
|
||||
width : 20px;
|
||||
height : 20px;
|
||||
box-sizing : border-box;
|
||||
}
|
||||
corewm-panel .PanelItemNotificationArea .StartupNotification > div > div:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 7px;
|
||||
top: 2px;
|
||||
width: 2px;
|
||||
height: 6px;
|
||||
background-color: #fff;
|
||||
content: "";
|
||||
|
||||
-webkit-animation: NotificationSpinAnim 3s linear infinite;
|
||||
-moz-animation: NotificationSpinAnim 3s linear infinite;
|
||||
-ms-animation: NotificationSpinAnim 3s linear infinite;
|
||||
animation: NotificationSpinAnim 3s linear infinite;
|
||||
|
||||
-webkit-transform-origin: 1px 6px;
|
||||
-moz-transform-origin: 1px 6px;
|
||||
-ms-transform-origin: 1px 6px;
|
||||
-o-transform-origin: 1px 6px;
|
||||
transform-origin: 1px 6px;
|
||||
}
|
||||
corewm-panel .PanelItemNotificationArea .StartupNotification > div > div:after {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 7px; /*( 16px / 2 ) - 1px;*/
|
||||
top: 3px;
|
||||
width: 2px;
|
||||
height: 5px; /*( 16px / 2 ) - 3px;*/
|
||||
background-color: #fff;
|
||||
content: "";
|
||||
|
||||
-webkit-animation: NotificationSpinAnim 18s linear infinite; /* NotificationSpinAnim 6 * 3s linear infinite; */
|
||||
-moz-animation: NotificationSpinAnim 18s linear infinite; /* NotificationSpinAnim 6 * 3s linear infinite; */
|
||||
-ms-animation: NotificationSpinAnim 18s linear infinite; /* NotificationSpinAnim 6 * 3s linear infinite; */
|
||||
-o-animation: NotificationSpinAnim 18s linear infinite; /* NotificationSpinAnim 6 * 3s linear infinite; */
|
||||
animation: NotificationSpinAnim 18s linear infinite; /* NotificationSpinAnim 6 * 3s linear infinite; */
|
||||
|
||||
-webkit-transform-origin: 1px 5px; /* 1px ( 16px / 2 ) - 3px;*/
|
||||
-moz-transform-origin: 1px 5px; /* 1px ( 16px / 2 ) - 3px;*/
|
||||
-ms-transform-origin: 1px 5px; /* 1px ( 16px / 2 ) - 3px;*/
|
||||
-o-transform-origin: 1px 5px; /* 1px ( 16px / 2 ) - 3px;*/
|
||||
transform-origin: 1px 5px; /* 1px ( 16px / 2 ) - 3px;*/
|
||||
}
|
||||
|
||||
corewm-panel .PanelItemNotificationArea .BusyNotification > div > div:after,
|
||||
corewm-panel .PanelItemNotificationArea .BusyNotification > div > div:before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 7px;
|
||||
top: 2px;
|
||||
width: 2px;
|
||||
height: 12px;
|
||||
background-color: #fff;
|
||||
content: "";
|
||||
|
||||
-webkit-transform-origin: 1px 6px; /* 1px ( 24px / 2 ) - 2px;*/
|
||||
-moz-transform-origin: 1px 6px; /* 1px ( 24px / 2 ) - 2px;*/
|
||||
-ms-transform-origin: 1px 6px; /* 1px ( 24px / 2 ) - 2px;*/
|
||||
-o-transform-origin: 1px 6px; /* 1px ( 24px / 2 ) - 2px;*/
|
||||
transform-origin: 1px 6px; /* 1px ( 24px / 2 ) - 2px;*/
|
||||
|
||||
-webkit-animation: NotificationSpinAnim 3s linear infinite;
|
||||
-moz-animation: NotificationSpinAnim 3s linear infinite;
|
||||
-ms-animation: NotificationSpinAnim 3s linear infinite;
|
||||
-o-animation: NotificationSpinAnim 3s linear infinite;
|
||||
animation: NotificationSpinAnim 3s linear infinite;
|
||||
}
|
||||
corewm-panel .PanelItemNotificationArea .BusyNotification > div > div:after {
|
||||
-webkit-animation: NotificationSpinAnim 3s linear -0.75s infinite;
|
||||
-moz-animation: NotificationSpinAnim 3s linear -0.75s infinite;
|
||||
-ms-animation: NotificationSpinAnim 3s linear -0.75s infinite;
|
||||
-o-animation: NotificationSpinAnim 3s linear -0.75s infinite;
|
||||
animation: NotificationSpinAnim 3s linear -0.75s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes NotificationSpinAnim {
|
||||
to {
|
||||
-webkit-transform: rotate( 360deg );
|
||||
}
|
||||
}
|
||||
@-moz-keyframes notificationspinanim {
|
||||
to {
|
||||
-moz-transform: rotate( 360deg );
|
||||
}
|
||||
}
|
||||
@-o-keyframes notificationspinanim {
|
||||
to {
|
||||
-o-transform: rotate( 360deg );
|
||||
}
|
||||
}
|
||||
@keyframes NotificationSpinAnim {
|
||||
to {
|
||||
transform: rotate( 360deg );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ===========================================================================
|
||||
* RESPONSIVE
|
||||
* ===========================================================================
|
||||
*/
|
||||
|
||||
@media all and (max-width: 800px) {
|
||||
|
||||
.PanelItemWindowList > ul > li > span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
4355
build/htdocs/dist/packages/default/CoreWM/combined.js
vendored
Normal file
44
build/htdocs/dist/packages/default/CoreWM/libs.js
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(WindowManager, Window, GUI, Utils, API, VFS) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LOCALES
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.CoreWM = OSjs.Applications.CoreWM || {};
|
||||
|
||||
})(OSjs.Core.WindowManager, OSjs.Core.Window, OSjs.GUI, OSjs.Utils, OSjs.API, OSjs.VFS);
|
80
build/htdocs/dist/packages/default/CoreWM/metadata.json
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"className": "CoreWM",
|
||||
"name": "OS.js Window Manager",
|
||||
"names": {
|
||||
"bg_BG": "Мениджър на прозорци на OS.js",
|
||||
"de_DE": "OS.js Fenster-Manager",
|
||||
"es_ES": "OS.js Window Manager",
|
||||
"fr_FR": "Gestionnaire de fenêtre OS.js",
|
||||
"it_IT": "OS.js Gestore Finestre",
|
||||
"ko_KR": "OS.js 윈도우 관리자",
|
||||
"nl_NL": "OS.js venster beheer",
|
||||
"no_NO": "OS.js Vinduhåndterer",
|
||||
"pl_PL": "Menedżer Okien OS.js",
|
||||
"ru_RU": "OS.js Оконный менеджер",
|
||||
"sk_SK": "Správca Okien OS.js",
|
||||
"tr_TR": "OS.js Pencere Yöneticisi",
|
||||
"vi_VN": "Quản lí cửa sổ OS.js"
|
||||
},
|
||||
"singular": true,
|
||||
"type": "windowmanager",
|
||||
"icon": "apps/gnome-window-manager.png",
|
||||
"splash": false,
|
||||
"preload": [
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
},
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
}
|
||||
],
|
||||
"panelItems": {
|
||||
"AppMenu": {
|
||||
"Name": "AppMenu",
|
||||
"Description": "Application Menu",
|
||||
"Icon": "actions/stock_about.png",
|
||||
"HasOptions": false
|
||||
},
|
||||
"Buttons": {
|
||||
"Name": "Buttons",
|
||||
"Description": "Button Bar",
|
||||
"Icon": "actions/stock_about.png"
|
||||
},
|
||||
"Clock": {
|
||||
"Name": "Clock",
|
||||
"Description": "View the time",
|
||||
"Icon": "status/appointment-soon.png",
|
||||
"HasOptions": true
|
||||
},
|
||||
"NotificationArea": {
|
||||
"Name": "NotificationArea",
|
||||
"Description": "View notifications",
|
||||
"Icon": "apps/gnome-panel-notification-area.png"
|
||||
},
|
||||
"Search": {
|
||||
"Name": "Search",
|
||||
"Description": "Perform searches",
|
||||
"Icon": "actions/find.png",
|
||||
"HasOptions": true
|
||||
},
|
||||
"Weather": {
|
||||
"Name": "Weather",
|
||||
"Description": "Weather notification",
|
||||
"Icon": "status/weather-few-clouds.png"
|
||||
},
|
||||
"WindowList": {
|
||||
"Name": "Window List",
|
||||
"Description": "Toggle between open windows",
|
||||
"Icon": "apps/xfwm4.png"
|
||||
}
|
||||
},
|
||||
"path": "default/CoreWM",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
78
build/htdocs/dist/packages/default/CoreWM/scheme.html
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
<application-window data-id="ClockSettingsDialog">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0">
|
||||
<gui-label>Time Format String:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-expand="true">
|
||||
<gui-text data-id="InputTimeFormatString">H:i:s</gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="1" data-shrink="0">
|
||||
<gui-label>Tooltip Format String:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-expand="true">
|
||||
<gui-text data-id="InputTooltipFormatString">l, j F Y</gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="1" data-shrink="0">
|
||||
<gui-label>Interval:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-expand="true">
|
||||
<gui-select data-id="InputInterval">
|
||||
<gui-select-option data-value="1000">1 second</gui-select-option>
|
||||
<gui-select-option data-value="60000">1 minute</gui-select-option>
|
||||
<gui-select-option data-value="3600000">1 hour</gui-select-option>
|
||||
</gui-select>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="1" data-shrink="0">
|
||||
<gui-label>UTC Time:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0">
|
||||
<gui-checkbox data-id="InputUseUTC"></gui-checkbox>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-grow="0" data-shrink="1">
|
||||
<gui-button data-id="ButtonApply">Apply</gui-button>
|
||||
<gui-button data-id="ButtonCancel">Cancel</gui-button>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-window>
|
||||
|
||||
<application-window data-id="IconViewShortcutDialog">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0">
|
||||
<gui-label>Launch:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-expand="true">
|
||||
<gui-text data-id="InputShortcutLaunch">ApplicationClassName</gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="0" data-shrink="0">
|
||||
<gui-label>Label:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-expand="true">
|
||||
<gui-text data-id="InputShortcutLabel"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="0" data-shrink="0">
|
||||
<gui-label>Launch arguments:</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="0" data-shrink="0" data-expand="true">
|
||||
<gui-text data-id="InputTooltipFormatString"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-grow="0" data-shrink="1">
|
||||
<gui-button data-id="ButtonApply">Apply</gui-button>
|
||||
<gui-button data-id="ButtonCancel">Cancel</gui-button>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-window>
|
BIN
build/htdocs/dist/packages/default/Draw/checkerboard.png
vendored
Normal file
After Width: | Height: | Size: 1.3 KiB |
41
build/htdocs/dist/packages/default/Draw/combined.css
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationDrawWindow {
|
||||
}*/
|
||||
|
||||
.ApplicationDrawWindow gui-canvas {
|
||||
background : url('checkerboard.png');
|
||||
}
|
||||
|
||||
.ApplicationDrawWindow gui-vbox-container[data-id="ScrollContainer"] {
|
||||
background : #DADADA;
|
||||
}
|
||||
|
1238
build/htdocs/dist/packages/default/Draw/combined.js
vendored
Normal file
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-color-pick-from-screen-16.png
vendored
Normal file
After Width: | Height: | Size: 566 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-cursor-16.png
vendored
Normal file
After Width: | Height: | Size: 322 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-selection-16.png
vendored
Normal file
After Width: | Height: | Size: 433 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-shape-circle-16.png
vendored
Normal file
After Width: | Height: | Size: 155 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-shape-ellipse-16.png
vendored
Normal file
After Width: | Height: | Size: 255 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-shape-rectangle-16.png
vendored
Normal file
After Width: | Height: | Size: 158 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-shape-square-16.png
vendored
Normal file
After Width: | Height: | Size: 86 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-tool-bucket-fill-16.png
vendored
Normal file
After Width: | Height: | Size: 822 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-tool-eraser-16.png
vendored
Normal file
After Width: | Height: | Size: 408 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-tool-path-16.png
vendored
Normal file
After Width: | Height: | Size: 678 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-tool-pencil-16.png
vendored
Normal file
After Width: | Height: | Size: 607 B |
BIN
build/htdocs/dist/packages/default/Draw/icons/stock-tool-text-16.png
vendored
Normal file
After Width: | Height: | Size: 704 B |
58
build/htdocs/dist/packages/default/Draw/metadata.json
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"className": "ApplicationDraw",
|
||||
"name": "Draw",
|
||||
"description": "Simple drawing application",
|
||||
"names": {
|
||||
"bg_BG": "Рисуване",
|
||||
"de_DE": "Zeichnen",
|
||||
"fr_FR": "Dessin",
|
||||
"it_IT": "Disegna",
|
||||
"ko_KR": "그림판",
|
||||
"nl_NL": "Tekenen",
|
||||
"no_NO": "Tegne",
|
||||
"pl_PL": "Rysowanie",
|
||||
"ru_RU": "Графический редактор",
|
||||
"sk_SK": "Kreslenie",
|
||||
"tr_TR": "Çiz",
|
||||
"vi_VN": "Vẽ"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Приложение за рисуване",
|
||||
"de_DE": "Einfaches Zeichen-Programm",
|
||||
"fr_FR": "Programme de dessin simple",
|
||||
"it_IT": "Semplice applicazione per creazione/modifica immagini",
|
||||
"ko_KR": "간단한 그리기 응용 프로그램",
|
||||
"nl_NL": "Eenvoudig tekenprogramma",
|
||||
"no_NO": "Simpelt tegne-program",
|
||||
"pl_PL": "Prosta aplikacja do rysowania",
|
||||
"ru_RU": "Простой графический редактор",
|
||||
"sk_SK": "Jednoduchá aplikácia na kreslenie",
|
||||
"vi_VN": "Phần mềm vẽ đơn giản"
|
||||
},
|
||||
"mime": [
|
||||
"^image"
|
||||
],
|
||||
"category": "graphics",
|
||||
"icon": "categories/gnome-graphics.png",
|
||||
"compability": [
|
||||
"canvas"
|
||||
],
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Draw",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
83
build/htdocs/dist/packages/default/Draw/scheme.html
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
<application-window data-id="DrawWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuNew" data-label="LBL_NEW"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSave" data-label="LBL_SAVE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSaveAs" data-label="LBL_SAVEAS"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
|
||||
<gui-hbox class="gui-no-overflow">
|
||||
<gui-hbox-container data-shrink="1" data-grow="0" data-basis="74px">
|
||||
<gui-toolbar data-orientation="vertical" style="text-align:center">
|
||||
<gui-color-box data-id="Foreground"></gui-color-box>
|
||||
<gui-color-box data-id="Background"></gui-color-box>
|
||||
<gui-button data-id="tool-pointer" data-group="tool" data-tool-name="pointer" data-icon="app://icons/stock-cursor-16.png"></gui-button>
|
||||
<gui-button data-id="tool-picker" data-group="tool" data-tool-name="picker" data-icon="app://icons/stock-color-pick-from-screen-16.png"></gui-button>
|
||||
<gui-button data-id="tool-bucket" data-group="tool" data-tool-name="bucket" data-icon="app://icons/stock-tool-bucket-fill-16.png"></gui-button>
|
||||
<gui-button data-id="tool-pencil" data-group="tool" data-tool-name="pencil" data-icon="app://icons/stock-tool-pencil-16.png"></gui-button>
|
||||
<gui-button data-id="tool-path" data-group="tool" data-tool-name="path" data-icon="app://icons/stock-tool-path-16.png"></gui-button>
|
||||
<gui-button data-id="tool-rectangle" data-group="tool" data-tool-name="rectangle" data-icon="app://icons/stock-shape-square-16.png"></gui-button>
|
||||
<gui-button data-id="tool-circle" data-group="tool" data-tool-name="circle" data-icon="app://icons/stock-shape-circle-16.png"></gui-button>
|
||||
|
||||
<gui-button data-group="tool" data-tool-name="cursor" data-icon="app://icons/stock-cursor-16.png" style="visibility:hidden;pointer-events:none"></gui-button>
|
||||
</gui-toolbar>
|
||||
</gui-hbox-container>
|
||||
|
||||
<gui-hbox-container data-shrink="0" data-grow="1" data-fill="true">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- TOOL BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-toolbar data-id="TopToolbar">
|
||||
|
||||
<gui-label>Line join</gui-label>
|
||||
<gui-select data-id="LineJoin">
|
||||
<gui-select-option data-value="round">Round</gui-select-option>
|
||||
<gui-select-option data-value="miter">Miter</gui-select-option>
|
||||
<gui-select-option data-value="bevel">Bevel</gui-select-option>
|
||||
</gui-select>
|
||||
|
||||
<gui-label>Line width</gui-label>
|
||||
<gui-select data-id="LineWidth">
|
||||
</gui-select>
|
||||
|
||||
<gui-checkbox data-id="LineStroke" data-label="Enable stroke"></gui-checkbox>
|
||||
|
||||
</gui-toolbar>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true" data-id="ScrollContainer">
|
||||
<gui-scroll-container data-id="ScrollView">
|
||||
<gui-canvas data-id="Canvas">
|
||||
</gui-canvas>
|
||||
</gui-scroll-container>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- STATUSBAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-statusbar data-id="Statusbar"></gui-statusbar>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
|
||||
|
||||
</application-window>
|
39
build/htdocs/dist/packages/default/FileManager/combined.css
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationFileManagerWindow {
|
||||
}*/
|
||||
|
||||
.ApplicationFileManagerWindow .unmounted {
|
||||
opacity : .6;
|
||||
}
|
||||
.ApplicationFileManagerWindow gui-menu-bar-entry[data-id="ContextMenu"] {
|
||||
display : none;
|
||||
}
|
1143
build/htdocs/dist/packages/default/FileManager/combined.js
vendored
Normal file
53
build/htdocs/dist/packages/default/FileManager/metadata.json
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"className": "ApplicationFileManager",
|
||||
"name": "File Manager",
|
||||
"description": "The default file manager",
|
||||
"names": {
|
||||
"bg_BG": "Файлов мениджър",
|
||||
"de_DE": "Dateimanager",
|
||||
"fr_FR": "Explorateur de fichier",
|
||||
"it_IT": "Gestore File",
|
||||
"nl_NL": "bestands beheer",
|
||||
"no_NO": "Fil-håndtering",
|
||||
"pl_PL": "Menedżer Plików",
|
||||
"ko_KR": "파일 탐색기",
|
||||
"sk_SK": "Správca súborov",
|
||||
"ru_RU": "Файловый менеджер",
|
||||
"tr_TR": "Dosya Yöneticisi",
|
||||
"vi_VN": "Quản lí file"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Стандартния файлов мениджър",
|
||||
"de_DE": "Standardmäßiger Dateimanager",
|
||||
"fr_FR": "Gestionnaire de fichier par défaut",
|
||||
"it_IT": "Il gestore file predefinito",
|
||||
"nl_NL": "Standaard bestands beheerder",
|
||||
"no_NO": "Standard Fil-håndtering program",
|
||||
"pl_PL": "Domyślny Menedżer Plików",
|
||||
"ko_KR": "기본 파일 관리자",
|
||||
"sk_SK": "Štandardný správca súborov",
|
||||
"ru_RU": "Стандартный файловый менеджер",
|
||||
"tr_TR": "Varsayılan dosya yöneticisi",
|
||||
"vi_VN": "Trình quản lí file mặc định"
|
||||
},
|
||||
"category": "utilities",
|
||||
"icon": "apps/file-manager.png",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/FileManager",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
112
build/htdocs/dist/packages/default/FileManager/scheme.html
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
<application-window data-id="FileManagerWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuCreate" data-label="LBL_CREATE">
|
||||
<gui-menu data-id="SubmenuCreate">
|
||||
<gui-menu-entry data-id="MenuCreateDirectory" data-label="LBL_DIRECTORY"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuCreateFile" data-label="LBL_FILE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-entry>
|
||||
|
||||
<gui-menu-entry data-id="MenuUpload" data-label="LBL_UPLOAD"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_EDIT">
|
||||
<gui-menu data-id="SubmenuEdit">
|
||||
<gui-menu-entry data-id="MenuRename" data-label="LBL_RENAME"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuDelete" data-label="LBL_DELETE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuInfo" data-label="LBL_INFORMATION"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPENWITH"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuDownload" data-label="LBL_DOWNLOAD_COMP"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_VIEW">
|
||||
<gui-menu data-id="SubmenuView">
|
||||
<gui-menu-entry data-id="MenuRefresh" data-label="LBL_REFRESH"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuShowSidebar" data-label="LBL_SHOW_SIDEBAR" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuShowNavigation" data-label="LBL_SHOW_NAVIGATION" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuShowHidden" data-label="LBL_SHOW_HIDDENFILES" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuShowExtension" data-label="LBL_SHOW_FILEEXTENSIONS" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="" data-label="LBL_VIEWTYPE">
|
||||
<gui-menu>
|
||||
<gui-menu-entry data-id="MenuViewList" data-label="LBL_LISTVIEW" data-type="radio" data-group="ViewType"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuViewIcon" data-label="LBL_ICONVIEW" data-type="radio" data-group="ViewType"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuViewTree" data-label="LBL_TREEVIEW" data-type="radio" data-group="ViewType"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-entry>
|
||||
<gui-menu-entry data-id="" data-label="LBL_SHOW_COLUMNS">
|
||||
<gui-menu>
|
||||
<gui-menu-entry data-id="MenuColumnFilename" data-label="LBL_FILENAME" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuColumnMIME" data-label="LBL_MIME" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuColumnCreated" data-label="LBL_CREATED" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuColumnModified" data-label="LBL_MODIFIED" data-type="checkbox"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuColumnSize" data-label="LBL_SIZE" data-type="checkbox"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
<!-- CONTEXT MENU -->
|
||||
<gui-menu-bar-entry data-id="ContextMenu" data-label="LBL_CONTEXT">
|
||||
<gui-menu data-id="SubmenuContext">
|
||||
<gui-menu-entry data-id="MenuCreate" data-label="LBL_CREATE">
|
||||
<gui-menu data-id="SubmenuCreate">
|
||||
<gui-menu-entry data-id="MenuCreateDirectory" data-label="LBL_DIRECTORY" data-func="MenuCreateDirectory"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuCreateFile" data-label="LBL_FILE" data-func="MenuCreateFile"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuUpload" data-label="LBL_UPLOAD" data-func="MenuUpload"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuRename" data-label="LBL_RENAME" data-func="MenuRename"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuDelete" data-label="LBL_DELETE" data-func="MenuDelete"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuInfo" data-label="LBL_INFORMATION" data-func="MenuInfo"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuOpen" data-label="LBL_OPENWITH" data-func="MenuOpen"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="ContextMenuDownload" data-label="LBL_DOWNLOAD_COMP" data-func="MenuDownload"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto" data-id="ToolbarContainer">
|
||||
<gui-toolbar data-id="TopToolbar" class="gui-flex">
|
||||
|
||||
<gui-button data-icon="stock://16x16/actions/back.png" data-id="GoBack"></gui-button>
|
||||
<gui-button data-icon="stock://16x16/actions/next.png" data-id="GoNext"></gui-button>
|
||||
<gui-text class="gui-flex-grow" data-id="GoLocation" data-placeholder="location:///path"></gui-text>
|
||||
|
||||
</gui-toolbar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-paned-view>
|
||||
<!-- SIDE PANEL -->
|
||||
<gui-paned-view-container data-basis="150px" data-grow="0" data-shrink="0" data-multiple="false" data-id="SideContainer">
|
||||
<gui-list-view data-id="SideView" data-single-click="true">
|
||||
</gui-list-view>
|
||||
</gui-paned-view-container>
|
||||
|
||||
<!-- FILE VIEW -->
|
||||
<gui-paned-view-container data-grow="1" data-shrink="1">
|
||||
<gui-file-view data-id="FileView">
|
||||
</gui-file-view>
|
||||
</gui-paned-view-container>
|
||||
</gui-paned-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
|
||||
<!-- STATUSBAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-statusbar data-id="Statusbar"></gui-statusbar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
93
build/htdocs/dist/packages/default/HTMLViewer/combined.js
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(DefaultApplication, DefaultApplicationWindow, Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationHTMLViewerWindow(app, metadata, scheme, file) {
|
||||
DefaultApplicationWindow.apply(this, ['ApplicationHTMLViewerWindow', {
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
width: 400,
|
||||
height: 200
|
||||
}, app, scheme, file]);
|
||||
}
|
||||
|
||||
ApplicationHTMLViewerWindow.prototype = Object.create(DefaultApplicationWindow.prototype);
|
||||
ApplicationHTMLViewerWindow.constructor = DefaultApplicationWindow.prototype;
|
||||
|
||||
ApplicationHTMLViewerWindow.prototype.init = function(wmRef, app, scheme) {
|
||||
var root = DefaultApplicationWindow.prototype.init.apply(this, arguments);
|
||||
scheme.render(this, 'HTMLViewerWindow', root);
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationHTMLViewerWindow.prototype.showFile = function(file, url) {
|
||||
if ( this._scheme ) {
|
||||
this._find('iframe').set('src', url);
|
||||
}
|
||||
DefaultApplicationWindow.prototype.showFile.apply(this, arguments);
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationHTMLViewer(args, metadata) {
|
||||
DefaultApplication.apply(this, ['ApplicationHTMLViewer', args, metadata, {
|
||||
extension: 'html',
|
||||
mime: 'text/htm',
|
||||
filename: 'index.html',
|
||||
fileypes: ['htm', 'html'],
|
||||
readData: false
|
||||
}]);
|
||||
}
|
||||
|
||||
ApplicationHTMLViewer.prototype = Object.create(DefaultApplication.prototype);
|
||||
ApplicationHTMLViewer.constructor = DefaultApplication;
|
||||
|
||||
ApplicationHTMLViewer.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.call(this, settings, metadata, scheme);
|
||||
var file = this._getArgument('file');
|
||||
this._addWindow(new ApplicationHTMLViewerWindow(this, metadata, scheme, file));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationHTMLViewer = OSjs.Applications.ApplicationHTMLViewer || {};
|
||||
OSjs.Applications.ApplicationHTMLViewer.Class = Object.seal(ApplicationHTMLViewer);
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
23
build/htdocs/dist/packages/default/HTMLViewer/metadata.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"className": "ApplicationHTMLViewer",
|
||||
"name": "HTML Viewer",
|
||||
"mime": [
|
||||
"text\\/html"
|
||||
],
|
||||
"icon": "mimetypes/html.png",
|
||||
"category": "utilities",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/HTMLViewer",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
17
build/htdocs/dist/packages/default/HTMLViewer/scheme.html
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<application-window data-id="HTMLViewerWindow">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-iframe data-id="iframe" />
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-window>
|
47
build/htdocs/dist/packages/default/MusicPlayer/api.php
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
if ( !defined("MusicPlayerCommand") ) define("MusicPlayerCommand", "/usr/bin/mediainfo");
|
||||
|
||||
class ApplicationMusicPlayer
|
||||
{
|
||||
|
||||
public static function call($method, $args) {
|
||||
if ( $method === 'info' ) {
|
||||
list($dirname, $fname, $protocol) = getRealPath($args['filename']);
|
||||
|
||||
if ( !class_exists('SimpleXMLElement') ) {
|
||||
throw new Exception("Cannot get media information -- No XML parser found");
|
||||
}
|
||||
if ( !function_exists('exec') ) {
|
||||
throw new Exception("Cannot get media information -- Exec not allowed");
|
||||
}
|
||||
|
||||
$cmd = sprintf("%s --Output=XML %s", MusicPlayerCommand, escapeshellcmd($fname));
|
||||
@exec($cmd, $content);
|
||||
if ( !$content ) {
|
||||
throw new Exception("Cannot get media information -- Query failed");
|
||||
}
|
||||
|
||||
try {
|
||||
$xml = new SimpleXMLElement(implode("\n", preg_replace("/_+/", "", $content)));
|
||||
} catch ( Exception $e ) {
|
||||
$xml = $e;
|
||||
}
|
||||
|
||||
if ( $xml !== null ) {
|
||||
if ( isset($xml->File[0]) && isset($xml->File[0]->track) && ($node = $xml->File->track) ) {
|
||||
return Array(
|
||||
'Artist' => isset($node->Performer) ? htmlspecialchars($node->Performer) : null,
|
||||
'Album' => isset($node->Album) ? htmlspecialchars($node->Album) : null,
|
||||
'Track' => isset($node->Track_name) ? htmlspecialchars($node->Track_name) : null
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
47
build/htdocs/dist/packages/default/MusicPlayer/combined.css
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationMusicPlayerWindow {
|
||||
}*/
|
||||
|
||||
.ApplicationMusicPlayerWindow gui-slider {
|
||||
margin : 4px;
|
||||
margin-top : 10px;
|
||||
margin-bottom : 10px;
|
||||
}
|
||||
.ApplicationMusicPlayerWindow gui-vbox[data-id="Metadata"] {
|
||||
margin : 4px;
|
||||
}
|
||||
.ApplicationMusicPlayerWindow gui-audio {
|
||||
display : none;
|
||||
}
|
||||
.ApplicationMusicPlayerWindow gui-button-bar {
|
||||
text-align : center;
|
||||
}
|
541
build/htdocs/dist/packages/default/MusicPlayer/combined.js
vendored
Normal file
@ -0,0 +1,541 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Application, Window, GUI, Dialogs, VFS) {
|
||||
// jscs:disable validateQuoteMarks
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LOCALES
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var _Locales = {
|
||||
bg_BG : {
|
||||
'Playlist' : 'Плейлист',
|
||||
'Playback aborted' : 'Прекратено изпълнение',
|
||||
'Network or communication error' : 'Проблем с връзка към мрежа',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Провалено декодиране, повереден файл или неподдържан формат',
|
||||
'Media source not supported' : 'Източника на медия не се поддържа',
|
||||
'Failed to play file' : 'Изпълнението на файла се провали',
|
||||
'Artist' : 'Изпълнител',
|
||||
'Album' : 'Албум',
|
||||
'Track' : 'Песен',
|
||||
'Time' : 'Време',
|
||||
'Media information query failed' : 'Получаване на информация провалено',
|
||||
'seek unavailable in format' : 'Невъществуващ формат',
|
||||
'The audio type is not supported: {0}' : 'Аудио формата не се поддържа'
|
||||
},
|
||||
de_DE : {
|
||||
'Playlist' : 'Wiedergabeliste',
|
||||
'Playback aborted' : 'Wiedergabe abgebrochen',
|
||||
'Network or communication error' : 'Netzwerk Kommunikationsfehler',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Dekodierung gescheitert. Fehlerhafte oder nicht unterstützte Datei',
|
||||
'Media source not supported' : 'Medienquelle nicht unterstützt',
|
||||
'Failed to play file' : 'Wiedergabe der Datei gescheitert',
|
||||
'Artist' : 'Künstler',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Titel',
|
||||
'Time' : 'Zeit',
|
||||
'Media information query failed' : 'Media Informationssuche gescheitert',
|
||||
'seek unavailable in format' : 'Spulen im Format nicht verfügbar',
|
||||
'The audio type is not supported: {0}' : 'Der Audio-Typ {0} ist nicht unterstützt'
|
||||
},
|
||||
es_ES : {
|
||||
'Playlist' : 'Lista de reproducción',
|
||||
'Playback aborted' : 'Playback anulado',
|
||||
'Network or communication error' : 'Error de red o de comunicación',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Fallo en el desentrelazado. Medio corrupto o no soportado',
|
||||
'Media source not supported' : 'Medio no soportado',
|
||||
'Failed to play file' : 'Error reproduciendo archivo',
|
||||
'Artist' : 'Artista',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Pista',
|
||||
'Time' : 'Tiempo',
|
||||
'Media information query failed' : 'Error recupersqndo información del medio',
|
||||
'seek unavailable in format' : 'búsqueda no disponible en este formato',
|
||||
'The audio type is not supported: {0}' : 'El tipo de audio no está soportado: {0}'
|
||||
},
|
||||
fr_FR : {
|
||||
'Playlist' : 'Liste de lecture',
|
||||
'Playback aborted' : 'Lecture interrompue',
|
||||
'Network or communication error' : 'Erreur de communication ou de réseau',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Décodage raté. Média corrompus ou non pris en charge',
|
||||
'Media source not supported' : 'Source de médias non pris en charge',
|
||||
'Failed to play file' : 'Impossible de lire le fichier',
|
||||
'Artist' : 'Artiste',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Piste',
|
||||
'Time' : 'Durée',
|
||||
'Media information query failed' : 'Requête des informations média échoué',
|
||||
'seek unavailable in format' : 'recherche indisponible dans ce format',
|
||||
'The audio type is not supported: {0}' : 'Le type audio n\'est pas pris en charge: {0}'
|
||||
},
|
||||
ar_DZ : {
|
||||
'Playlist' : 'قائمة القرائة',
|
||||
'Playback aborted' : 'قطع التشغيل',
|
||||
'Network or communication error' : 'خطأ في الإتصال بالشبكة',
|
||||
'Decoding failed. Corruption or unsupported media' : 'فشل في فك التشفير. وسائط غير صالحة أو غير مدعومة',
|
||||
'Media source not supported' : 'وسائط غير مدعومة',
|
||||
'Failed to play file' : 'لايمكن قراءة الملف',
|
||||
'Artist' : 'الفنان',
|
||||
'Album' : 'الألبوم',
|
||||
'Track' : 'المقطع',
|
||||
'Time' : 'المدة',
|
||||
'Media information query failed' : 'خطأ في قراءة معلومات الوسائط',
|
||||
'seek unavailable in format' : 'بحث غير ممكن في هذا النوع',
|
||||
'The audio type is not supported: {0}' : 'نوع الملف الصوتي غير مدعوم: {0}'
|
||||
},
|
||||
it_IT : {
|
||||
'Playlist' : 'Playlist',
|
||||
'Playback aborted' : 'Riproduzione terminata',
|
||||
'Network or communication error' : 'Errore di rete o di comunicazione',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Decodifica fallita. Supporto corroto o non supportato.',
|
||||
'Media source not supported' : 'Sorgente multimediale non supportata',
|
||||
'Failed to play file' : 'Riproduzione file fallita',
|
||||
'Artist' : 'Artista',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Traccia',
|
||||
'Time' : 'Tempo',
|
||||
'Media information query failed' : 'Recupero informazioni media fallita',
|
||||
'seek unavailable in format' : 'ricerca non disponibile nel formato',
|
||||
'The audio type is not supported: {0}' : 'Tipo di audio non supportato: {0}'
|
||||
},
|
||||
ko_KR : {
|
||||
'Playlist' : '재생목록',
|
||||
'Playback aborted' : '일시중지',
|
||||
'Network or communication error' : '네트워크 등 통신 문제가 발생했습니다',
|
||||
'Decoding failed. Corruption or unsupported media' : '디코딩에 실패했습니다. 손상되었거나 지원하지 않는 형식입니다',
|
||||
'Media source not supported' : '지원하지 않는 미디어 소스입니다',
|
||||
'Failed to play file' : '파일을 재생하는데 실패했습니다',
|
||||
'Artist' : '아티스트',
|
||||
'Album' : '앨범',
|
||||
'Track' : '트랙',
|
||||
'Time' : '시간',
|
||||
'Media information query failed' : '미디어 정보 조회에 실패했습니다',
|
||||
'seek unavailable in format' : '탐색을 지원하지 않는 형식입니다',
|
||||
'The audio type is not supported: {0}' : '이 오디오 형식은 지원하지 않습니다: {0}'
|
||||
},
|
||||
nl_NL : {
|
||||
'Playlist' : 'Afspeellijst',
|
||||
'Playback aborted' : 'Afspelen afgebroken',
|
||||
'Network or communication error' : 'Netwerk of communicatie fout',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Decoderen mislukt: bestandstype wordt niet ondersteund',
|
||||
'Media source not supported' : 'Mediabron wordt niet ondersteund',
|
||||
'Failed to play file' : 'Afspelen van bestand mislukt',
|
||||
'Artist' : 'Artiest',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Nummer',
|
||||
'Time' : 'Tijd',
|
||||
'Media information query failed' : 'Zoeken naar media is niet gelukt',
|
||||
'seek unavailable in format' : 'Voor/achteruit spoelen is niet beschikbaar in dit formaat',
|
||||
'The audio type is not supported: {0}' : 'Audio type {0} wordt niet ondersteund'
|
||||
},
|
||||
no_NO : {
|
||||
'Playlist' : 'Spilleliste',
|
||||
'Playback aborted' : 'Avspilling avbrutt',
|
||||
'Network or communication error' : 'Nettverks- eller kommunikasjonsfeil',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Dekoding feilet. Korrupt eller ustøttet media',
|
||||
'Media source not supported' : 'Media-kilde ikke støttet',
|
||||
'Failed to play file' : 'Klarte ikke spille av fil',
|
||||
'Artist' : 'Artist',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Låt',
|
||||
'Time' : 'Tid',
|
||||
'Media information query failed' : 'Media-informasjon forespursel feil',
|
||||
'seek unavailable in format' : 'spoling utilgjenglig i format',
|
||||
'The audio type is not supported: {0}' : 'Denne lyd-typen er ikke støttet: {0}'
|
||||
},
|
||||
pl_PL : {
|
||||
'Playlist' : 'Playlista',
|
||||
'Playback aborted' : 'Odtwarzanie Przerwane',
|
||||
'Network or communication error' : 'Błąd Sieci lub Komunikacji',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Dekodowanie nie powiodło się. Uszkodzony lub nieobsługiwany plik',
|
||||
'Media source not supported' : 'Plik nie jest wspierany',
|
||||
'Failed to play file' : 'Nie można odtworzyć pliku',
|
||||
'Artist' : 'Artysta',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Ścieżka',
|
||||
'Time' : 'Czas',
|
||||
'Media information query failed' : 'Brak informacji',
|
||||
'seek unavailable in format' : 'Przewijanie nie jest obsługiwane w tym formacie',
|
||||
'The audio type is not supported: {0}' : 'Ten typ audio nie jest obsługiwany: {0}'
|
||||
},
|
||||
ru_RU : {
|
||||
'Playlist' : 'Список воспроизведения',
|
||||
'Playback aborted' : 'Воспроизведение прервано',
|
||||
'Network or communication error' : 'Ошибка соединения',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Не удалось декодировать файл. Файл поврежден или данынй формат не поддерживается',
|
||||
'Media source not supported' : 'Тип файла не поддерживается',
|
||||
'Failed to play file' : 'Ошибка воспроизведения',
|
||||
'Artist' : 'Артист',
|
||||
'Album' : 'Альбом',
|
||||
'Track' : 'Трек',
|
||||
'Time' : 'Время',
|
||||
'Media information query failed' : 'Ошибка в запросе медиа-информации',
|
||||
'seek unavailable in format' : 'Перемотка недоступна в этом формате',
|
||||
'The audio type is not supported: {0}' : 'Тип аудио не поддерживается: {0}'
|
||||
},
|
||||
sk_SK : {
|
||||
'Playlist' : 'Zoznam skladieb',
|
||||
'Playback aborted' : 'Prehrávanie prerušené',
|
||||
'Network or communication error' : 'Chyba v sieťovej komunikácii',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Dekódovanie sa nepodarilo alebo médium je nepodporované',
|
||||
'Media source not supported' : 'Zdrojové médium nie je podporované',
|
||||
'Failed to play file' : 'Chyba pri prehrávaní súboru',
|
||||
'Artist' : 'Umelec',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Skladba',
|
||||
'Time' : 'Čas',
|
||||
'Media information query failed' : 'Chyba pri získavaní informácii o médiu',
|
||||
'seek unavailable in format' : 'Formát média nepodporuje preskakovanie (seek)',
|
||||
'The audio type is not supported: {0}' : 'Nepodporovaný formát: {0}'
|
||||
},
|
||||
|
||||
tr_TR : {
|
||||
'Playlist' : 'Oynatma listesi',
|
||||
'Playback aborted' : 'kayıt çalma/dinleme durduruldu',
|
||||
'Network or communication error' : 'ağ veya iletişim hatası',
|
||||
'Decoding failed. Corruption or unsupported media' : 'çözümleme hatası. Bozuk veya çalışmıyor.',
|
||||
'Media source not supported' : 'medya kaynağı bulunamadı',
|
||||
'Failed to play file' : 'Oynatma hatası',
|
||||
'Artist' : 'Artist',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Parça',
|
||||
'Time' : 'zaman',
|
||||
'Media information query failed' : 'medya bilgisini elde etmede hata oluştu',
|
||||
'seek unavailable in format' : 'bu formatta ileri saramazsınız',
|
||||
'The audio type is not supported: {0}' : 'Bu format desteklenmiyor: {0}'
|
||||
},
|
||||
vi_VN : {
|
||||
'Playlist' : 'Danh sách phát',
|
||||
'Playback aborted' : 'Phát lại bị hủy',
|
||||
'Network or communication error' : 'Mạng hoặc thông tin liên lạc bị lỗi',
|
||||
'Decoding failed. Corruption or unsupported media' : 'Giải mã thất bại. Tập tin bị hỏng hoặc không được hỗ trợ',
|
||||
'Media source not supported' : 'Nguồn phương tiện không được hỗ trợ',
|
||||
'Failed to play file' : 'Không thể chơi tập tin',
|
||||
'Artist' : 'Ca sĩ',
|
||||
'Album' : 'Album',
|
||||
'Track' : 'Bài hát',
|
||||
'Time' : 'Thời gian',
|
||||
'Media information query failed' : 'Truy vấn thông tin tập tin thất bại',
|
||||
'seek unavailable in format' : 'không tua được trong định dạng này',
|
||||
'The audio type is not supported: {0}' : 'Loại âm thanh {0} không được hỗ trợ'
|
||||
}
|
||||
};
|
||||
|
||||
function _() {
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
args.unshift(_Locales);
|
||||
return OSjs.API.__.apply(this, args);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationMusicPlayer = OSjs.Applications.ApplicationMusicPlayer || {};
|
||||
OSjs.Applications.ApplicationMusicPlayer._ = _;
|
||||
|
||||
})(OSjs.Core.Application, OSjs.Core.Window, OSjs.GUI, OSjs.Dialogs, OSjs.VFS);
|
||||
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(DefaultApplication, DefaultApplicationWindow, Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
// TODO: Playlist
|
||||
// TODO: Server seek support: https://gist.github.com/codler/3906826
|
||||
|
||||
function formatTime(secs) {
|
||||
var hr = Math.floor(secs / 3600);
|
||||
var min = Math.floor((secs - (hr * 3600)) / 60);
|
||||
var sec = Math.floor(secs - (hr * 3600) - (min * 60));
|
||||
|
||||
if (min < 10) {
|
||||
min = '0' + min;
|
||||
}
|
||||
if (sec < 10) {
|
||||
sec = '0' + sec;
|
||||
}
|
||||
|
||||
return min + ':' + sec;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationMusicPlayerWindow(app, metadata, scheme, file) {
|
||||
DefaultApplicationWindow.apply(this, ['ApplicationMusicPlayerWindow', {
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
allow_drop: true,
|
||||
allow_resize: false,
|
||||
allow_maximize: false,
|
||||
width: 370,
|
||||
height: 260
|
||||
}, app, scheme, file]);
|
||||
|
||||
this.updated = false;
|
||||
}
|
||||
|
||||
ApplicationMusicPlayerWindow.prototype = Object.create(DefaultApplicationWindow.prototype);
|
||||
ApplicationMusicPlayerWindow.constructor = DefaultApplicationWindow.prototype;
|
||||
|
||||
ApplicationMusicPlayerWindow.prototype.init = function(wm, app, scheme) {
|
||||
var root = DefaultApplicationWindow.prototype.init.apply(this, arguments);
|
||||
var self = this;
|
||||
|
||||
// Load and set up scheme (GUI) here
|
||||
scheme.render(this, 'MusicPlayerWindow', root, null, null, {
|
||||
_: OSjs.Applications.ApplicationMusicPlayer._
|
||||
});
|
||||
|
||||
var label = this._scheme.find(this, 'LabelTime');
|
||||
var seeker = this._scheme.find(this, 'Seek');
|
||||
|
||||
var player = scheme.find(this, 'Player');
|
||||
var audio = player.$element.firstChild;
|
||||
|
||||
scheme.find(this, 'ButtonStart').set('disabled', true);
|
||||
scheme.find(this, 'ButtonRew').set('disabled', true);
|
||||
var buttonPlay = scheme.find(this, 'ButtonPlay').set('disabled', true).on('click', function() {
|
||||
audio.play();
|
||||
});
|
||||
var buttonPause = scheme.find(this, 'ButtonPause').set('disabled', true).on('click', function() {
|
||||
audio.pause();
|
||||
});
|
||||
scheme.find(this, 'ButtonFwd').set('disabled', true);
|
||||
scheme.find(this, 'ButtonEnd').set('disabled', true);
|
||||
|
||||
seeker.on('change', function(ev) {
|
||||
if ( audio && !audio.paused ) {
|
||||
try {
|
||||
audio.pause();
|
||||
if ( ev ) {
|
||||
audio.currentTime = ev.detail || 0;
|
||||
}
|
||||
audio.play();
|
||||
} catch ( e ) {}
|
||||
}
|
||||
});
|
||||
|
||||
player.on('play', function(ev) {
|
||||
seeker.set('disabled', false);
|
||||
buttonPause.set('disabled', false);
|
||||
buttonPlay.set('disabled', true);
|
||||
});
|
||||
player.on('ended', function(ev) {
|
||||
seeker.set('disabled', true);
|
||||
buttonPause.set('disabled', true);
|
||||
});
|
||||
player.on('pause', function(ev) {
|
||||
seeker.set('disabled', true);
|
||||
buttonPause.set('disabled', false);
|
||||
buttonPlay.set('disabled', false);
|
||||
});
|
||||
player.on('loadeddata', function(ev) {
|
||||
});
|
||||
player.on('timeupdate', function(ev) {
|
||||
self.updateTime(label, seeker);
|
||||
});
|
||||
player.on('error', function(ev) {
|
||||
if ( !player.$element.src ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var msg = null;
|
||||
try {
|
||||
switch ( ev.target.error.code ) {
|
||||
case ev.target.error.MEDIA_ERR_ABORTED:
|
||||
msg = OSjs.Applications.ApplicationMusicPlayer._('Playback aborted');
|
||||
break;
|
||||
case ev.target.error.MEDIA_ERR_NETWORK:
|
||||
msg = OSjs.Applications.ApplicationMusicPlayer._('Network or communication error');
|
||||
break;
|
||||
case ev.target.error.MEDIA_ERR_DECODE:
|
||||
msg = OSjs.Applications.ApplicationMusicPlayer._('Decoding failed. Corruption or unsupported media');
|
||||
break;
|
||||
case ev.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
|
||||
msg = OSjs.Applications.ApplicationMusicPlayer._('Media source not supported');
|
||||
break;
|
||||
default:
|
||||
msg = OSjs.API._('ERR_APP_UNKNOWN_ERROR');
|
||||
break;
|
||||
}
|
||||
} catch ( e ) {
|
||||
msg = OSjs.API._('ERR_GENERIC_APP_FATAL_FMT', e);
|
||||
}
|
||||
|
||||
if ( msg ) {
|
||||
API.createDialog('Alert', {title: self._title, message: msg}, null, self);
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationMusicPlayerWindow.prototype.showFile = function(file, content) {
|
||||
if ( !file || !content ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var scheme = this._scheme;
|
||||
var player = scheme.find(this, 'Player');
|
||||
var seeker = this._scheme.find(this, 'Seek');
|
||||
var audio = player.$element.firstChild;
|
||||
|
||||
var artist = file ? file.filename : '';
|
||||
var album = file ? Utils.dirname(file.path) : '';
|
||||
|
||||
var labelArtist = this._scheme.find(this, 'LabelArtist').set('value', '');
|
||||
var labelTitle = this._scheme.find(this, 'LabelTitle').set('value', artist);
|
||||
var labelAlbum = this._scheme.find(this, 'LabelAlbum').set('value', album);
|
||||
this._scheme.find(this, 'LabelTime').set('value', '');
|
||||
seeker.set('min', 0);
|
||||
seeker.set('max', 0);
|
||||
seeker.set('value', 0);
|
||||
|
||||
this.updated = false;
|
||||
|
||||
function getInfo() {
|
||||
self._app._api('info', {filename: file.path}, function(err, info) {
|
||||
if ( info ) {
|
||||
if ( info.Artist ) {
|
||||
labelArtist.set('value', info.Artist);
|
||||
}
|
||||
if ( info.Album ) {
|
||||
labelAlbum.set('value', info.Album);
|
||||
}
|
||||
if ( info.Title ) {
|
||||
labelTitle.set('value', info.Track);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
audio.src = content || '';
|
||||
audio.play();
|
||||
getInfo();
|
||||
};
|
||||
|
||||
ApplicationMusicPlayerWindow.prototype.updateTime = function(label, seeker) {
|
||||
if ( this._destroyed ) {
|
||||
return; // Important because async
|
||||
}
|
||||
|
||||
var player = this._scheme.find(this, 'Player');
|
||||
var audio = player.$element.firstChild;
|
||||
|
||||
var total = audio.duration;
|
||||
var current = audio.currentTime;
|
||||
var unknown = false;
|
||||
|
||||
if ( isNaN(current) || !isFinite(current) ) {
|
||||
current = 0.0;
|
||||
}
|
||||
|
||||
if ( isNaN(total) || !isFinite(total) ) {
|
||||
total = current;
|
||||
unknown = true;
|
||||
}
|
||||
|
||||
var time = Utils.format('{0} / {1}', formatTime(current), unknown ? '<unknown>' : formatTime(total));
|
||||
|
||||
if ( !this.updated ) {
|
||||
seeker.set('min', 0);
|
||||
seeker.set('max', total);
|
||||
}
|
||||
|
||||
label.set('value', time);
|
||||
seeker.set('value', current);
|
||||
|
||||
this.updated = true;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationMusicPlayer = function(args, metadata) {
|
||||
DefaultApplication.apply(this, ['ApplicationMusicPlayer', args, metadata, {
|
||||
readData: false
|
||||
}]);
|
||||
};
|
||||
|
||||
ApplicationMusicPlayer.prototype = Object.create(DefaultApplication.prototype);
|
||||
ApplicationMusicPlayer.constructor = DefaultApplication;
|
||||
|
||||
ApplicationMusicPlayer.prototype.destroy = function() {
|
||||
return DefaultApplication.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationMusicPlayer.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.call(this, settings, metadata, scheme);
|
||||
var file = this._getArgument('file');
|
||||
this._addWindow(new ApplicationMusicPlayerWindow(this, metadata, scheme, file));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationMusicPlayer = OSjs.Applications.ApplicationMusicPlayer || {};
|
||||
OSjs.Applications.ApplicationMusicPlayer.Class = Object.seal(ApplicationMusicPlayer);
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
47
build/htdocs/dist/packages/default/MusicPlayer/metadata.json
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"className": "ApplicationMusicPlayer",
|
||||
"name": "Music Player",
|
||||
"names": {
|
||||
"bg_BG": "Музикален плеър",
|
||||
"de_DE": "Musikspieler",
|
||||
"es_ES": "Music Player",
|
||||
"fr_FR": "Lecteur de musique",
|
||||
"it_IT": "Lettore Musicale",
|
||||
"ko_KR": "뮤직 플레이어",
|
||||
"nl_NL": "Audio speler",
|
||||
"no_NO": "Musikkspiller",
|
||||
"pl_PL": "Odtwarzacz muzyki",
|
||||
"ru_RU": "Аудиоплеер",
|
||||
"sk_SK": "Prehrávač hudby",
|
||||
"tr_TR": "Muzik Çalar",
|
||||
"vi_VN": "Nghe nhạc"
|
||||
},
|
||||
"mime": [
|
||||
"^audio",
|
||||
"osjs\\/playlist"
|
||||
],
|
||||
"category": "multimedia",
|
||||
"icon": "status/audio-volume-high.png",
|
||||
"singular": true,
|
||||
"compability": [
|
||||
"audio"
|
||||
],
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/MusicPlayer",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
88
build/htdocs/dist/packages/default/MusicPlayer/scheme.html
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
<application-window data-id="MusicPlayerWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-shrink="1" data-basis="auto">
|
||||
|
||||
<gui-vbox data-id="Metadata">
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-basis="80">
|
||||
<gui-label class="gui-bold">Artist</gui-label>
|
||||
</gui-hbox-container>
|
||||
<gui-hbox-container>
|
||||
<gui-label data-id="LabelArtist"></gui-label>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-basis="80">
|
||||
<gui-label class="gui-bold">Album</gui-label>
|
||||
</gui-hbox-container>
|
||||
<gui-hbox-container>
|
||||
<gui-label data-id="LabelAlbum"></gui-label>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-basis="80">
|
||||
<gui-label class="gui-bold">Title</gui-label>
|
||||
</gui-hbox-container>
|
||||
<gui-hbox-container>
|
||||
<gui-label data-id="LabelTitle"></gui-label>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-hbox>
|
||||
<gui-hbox-container data-basis="80">
|
||||
<gui-label class="gui-bold">Time</gui-label>
|
||||
</gui-hbox-container>
|
||||
<gui-hbox-container>
|
||||
<gui-label data-id="LabelTime"></gui-label>
|
||||
</gui-hbox-container>
|
||||
</gui-hbox>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-expand="true" data-grow="1">
|
||||
<gui-slider data-id="Seek"></gui-slider>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="center">
|
||||
<gui-button-bar data-id="Controls">
|
||||
<gui-button data-id="ButtonStart" data-icon="stock://32x32/actions/player_start.png" data-icon-size="32"></gui-button>
|
||||
<gui-button data-id="ButtonRew" data-icon="stock://32x32/actions/player_rew.png" data-icon-size="32"></gui-button>
|
||||
<gui-button data-id="ButtonPlay" data-icon="stock://32x32/actions/player_play.png" data-icon-size="32"></gui-button>
|
||||
<gui-button data-id="ButtonPause" data-icon="stock://32x32/actions/player_pause.png" data-icon-size="32"></gui-button>
|
||||
<gui-button data-id="ButtonFwd" data-icon="stock://32x32/actions/player_fwd.png" data-icon-size="32"></gui-button>
|
||||
<gui-button data-id="ButtonEnd" data-icon="stock://32x32/actions/player_end.png" data-icon-size="32"></gui-button>
|
||||
</gui-button-bar>
|
||||
|
||||
<gui-audio data-id="Player"></gui-audio>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
55
build/htdocs/dist/packages/default/Preview/combined.css
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
.ApplicationPreviewWindow gui-container {
|
||||
overflow : hidden;
|
||||
font-size : 0;
|
||||
text-align : center;
|
||||
}
|
||||
.ApplicationPreviewWindow gui-video {
|
||||
vertical-align : middle;
|
||||
display : inline-block;
|
||||
background : #000;
|
||||
height : 100%;
|
||||
width : 100%;
|
||||
}
|
||||
|
||||
.ApplicationPreviewWindow gui-video > video {
|
||||
height : 100%;
|
||||
width : 100%;
|
||||
display : inline-block;
|
||||
}
|
||||
|
||||
.ApplicationPreviewWindow gui-image {
|
||||
width : auto;
|
||||
}
|
||||
.ApplicationPreviewWindow gui-image[data-zoom="fit"] > img {
|
||||
width : 100%;
|
||||
}
|
204
build/htdocs/dist/packages/default/Preview/combined.js
vendored
Normal file
@ -0,0 +1,204 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(DefaultApplication, DefaultApplicationWindow, Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationPreviewWindow(app, metadata, scheme, file) {
|
||||
DefaultApplicationWindow.apply(this, ['ApplicationPreviewWindow', {
|
||||
allow_drop: true,
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
width: 400,
|
||||
height: 200
|
||||
}, app, scheme, file]);
|
||||
|
||||
this.zoomLevel = 0;
|
||||
this.isImage = true;
|
||||
this.origWidth = 0;
|
||||
this.origHeight = 0;
|
||||
this.$view = null;
|
||||
}
|
||||
|
||||
ApplicationPreviewWindow.prototype = Object.create(DefaultApplicationWindow.prototype);
|
||||
ApplicationPreviewWindow.constructor = DefaultApplicationWindow.prototype;
|
||||
|
||||
ApplicationPreviewWindow.prototype.destroy = function() {
|
||||
this.$view = null;
|
||||
|
||||
return DefaultApplicationWindow.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype.init = function(wm, app, scheme) {
|
||||
var self = this;
|
||||
var root = DefaultApplicationWindow.prototype.init.apply(this, arguments);
|
||||
|
||||
// Load and set up scheme (GUI) here
|
||||
scheme.render(this, 'PreviewWindow', root);
|
||||
|
||||
this._find('ZoomIn').son('click', this, this.onZoomIn);
|
||||
this._find('ZoomOut').son('click', this, this.onZoomOut);
|
||||
this._find('ZoomFit').son('click', this, this.onZoomFit);
|
||||
this._find('ZoomOriginal').son('click', this, this.onZoomOriginal);
|
||||
|
||||
var c = this._find('Content').$element;
|
||||
Utils.$bind(c, 'mousewheel', function(ev, pos) {
|
||||
if ( pos.z === 1 ) {
|
||||
self.onZoomOut();
|
||||
} else if ( pos.z === -1 ) {
|
||||
self.onZoomIn();
|
||||
}
|
||||
});
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype.showFile = function(file, result) {
|
||||
var self = this;
|
||||
var root = this._scheme.find(this, 'Content').$element;
|
||||
Utils.$empty(root);
|
||||
|
||||
if ( result ) {
|
||||
this.zoomLevel = 0;
|
||||
|
||||
if ( file.mime.match(/^image/) ) {
|
||||
this.isImage = true;
|
||||
this.$view = this._scheme.create(self, 'gui-image', {src: result}, root, {
|
||||
onload: function() {
|
||||
self.origWidth = this.offsetWidth;
|
||||
self.origHeight = this.offsetHeight;
|
||||
self._resizeTo(this.offsetWidth, this.offsetHeight, true, false, this);
|
||||
}
|
||||
});
|
||||
} else if ( file.mime.match(/^video/) ) {
|
||||
this.isImage = false;
|
||||
this.$view = this._scheme.create(self, 'gui-video', {src: result, controls: true, autoplay: true}, root, {
|
||||
onload: function() {
|
||||
self._resizeTo(this.offsetWidth, this.offsetHeight, true, false, this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var toolbar = this._find('Toolbar');
|
||||
if ( toolbar ) {
|
||||
toolbar[this.isImage ? 'show' : 'hide']();
|
||||
}
|
||||
|
||||
DefaultApplicationWindow.prototype.showFile.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype._onZoom = function(val) {
|
||||
if ( !this.isImage || !this.$view ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var zoom = ['in', 'out'].indexOf(val) !== -1;
|
||||
var attr = 'zoomed';
|
||||
var w = null;
|
||||
|
||||
if ( val === 'in' ) {
|
||||
this.zoomLevel = Math.min(10, this.zoomLevel + 1);
|
||||
} else if ( val === 'out' ) {
|
||||
this.zoomLevel = Math.max(-10, this.zoomLevel - 1);
|
||||
} else {
|
||||
this.zoomLevel = 0;
|
||||
attr = val === 'fit' ? val : '';
|
||||
}
|
||||
|
||||
if ( zoom ) {
|
||||
var z = this.zoomLevel;
|
||||
if ( z === 0 ) {
|
||||
z = 1;
|
||||
w = this.origWidth;
|
||||
} else if ( z > 0 ) {
|
||||
z += 1;
|
||||
w = this.origWidth * z;
|
||||
} else if ( z < 0 ) {
|
||||
z -= 1;
|
||||
w = Math.abs(this.origWidth / z);
|
||||
}
|
||||
|
||||
this._setTitle(this.currentFile.filename + ' (' + String(z * 100) + '%)', true);
|
||||
} else {
|
||||
this._setTitle(this.currentFile.filename, true);
|
||||
}
|
||||
|
||||
this.$view.$element.setAttribute('data-zoom', attr);
|
||||
this.$view.$element.firstChild.style.width = (w === null ? 'auto' : String(w) + 'px');
|
||||
}
|
||||
|
||||
ApplicationPreviewWindow.prototype.onZoomIn = function() {
|
||||
this._onZoom('in');
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype.onZoomOut = function() {
|
||||
this._onZoom('out');
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype.onZoomFit = function() {
|
||||
this._onZoom('fit');
|
||||
};
|
||||
|
||||
ApplicationPreviewWindow.prototype.onZoomOriginal = function() {
|
||||
this._onZoom();
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationPreview = function(args, metadata) {
|
||||
DefaultApplication.apply(this, ['ApplicationPreview', args, metadata, {
|
||||
readData: false
|
||||
}]);
|
||||
};
|
||||
|
||||
ApplicationPreview.prototype = Object.create(DefaultApplication.prototype);
|
||||
ApplicationPreview.constructor = DefaultApplication;
|
||||
|
||||
ApplicationPreview.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.call(this, settings, metadata, scheme);
|
||||
var file = this._getArgument('file');
|
||||
this._addWindow(new ApplicationPreviewWindow(this, metadata, scheme, file));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationPreview = OSjs.Applications.ApplicationPreview || {};
|
||||
OSjs.Applications.ApplicationPreview.Class = Object.seal(ApplicationPreview);
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
57
build/htdocs/dist/packages/default/Preview/metadata.json
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"className": "ApplicationPreview",
|
||||
"name": "Preview",
|
||||
"description": "Preview image files",
|
||||
"names": {
|
||||
"bg_BG": "Преглед на изображения",
|
||||
"de_DE": "Vorschau",
|
||||
"fr_FR": "Visionneuse",
|
||||
"it_IT": "Anteprima Immagini",
|
||||
"ko_KR": "미리보기",
|
||||
"nl_NL": "Foto viewer",
|
||||
"no_NO": "Forhåndsviser",
|
||||
"pl_PL": "Podgląd",
|
||||
"ru_RU": "Просмотрщик",
|
||||
"sk_SK": "Prehliadač obrázkov",
|
||||
"tr_TR": "Önizle",
|
||||
"vi_VN": "Trình xem ảnh"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Преглед на изображения",
|
||||
"de_DE": "Bildervorschau",
|
||||
"fr_FR": "Visionneuse de photos",
|
||||
"it_IT": "Anteprima Immagini",
|
||||
"ko_KR": "이미지 파일을 미리 봅니다",
|
||||
"nl_NL": "Foto viewer",
|
||||
"no_NO": "Forhåndsvisning av bilde-filer",
|
||||
"pl_PL": "Podgląd zdjęć",
|
||||
"ru_RU": "Просмотрщик изображений",
|
||||
"sk_SK": "Prehliadač obrázkov",
|
||||
"tr_TR": "resim dosyalarını önizle",
|
||||
"vi_VN": "Trình xem ảnh"
|
||||
},
|
||||
"mime": [
|
||||
"^image",
|
||||
"^video"
|
||||
],
|
||||
"category": "multimedia",
|
||||
"icon": "mimetypes/image.png",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Preview",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
37
build/htdocs/dist/packages/default/Preview/scheme.html
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<application-window data-id="PreviewWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto" data-id="Toolbar">
|
||||
<gui-toolbar>
|
||||
<gui-button data-id="ZoomOriginal" data-icon="stock://16x16/actions/viewmag1.png"></gui-button>
|
||||
<gui-button data-id="ZoomFit" data-icon="stock://16x16/actions/viewmagfit.png"></gui-button>
|
||||
<gui-button data-id="ZoomOut" data-icon="stock://16x16/actions/zoom-out.png"></gui-button>
|
||||
<gui-button data-id="ZoomIn" data-icon="stock://16x16/actions/zoom-in.png"></gui-button>
|
||||
</gui-toolbar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-container data-id="Content">
|
||||
</gui-container>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
|
||||
|
||||
</application-window>
|
33
build/htdocs/dist/packages/default/ProcessViewer/combined.css
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationProcessViewerWindow application-window-content {
|
||||
}*/
|
||||
|
137
build/htdocs/dist/packages/default/ProcessViewer/combined.js
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationProcessViewerWindow(app, metadata, scheme) {
|
||||
Window.apply(this, ['ApplicationProcessViewerWindow', {
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
width: 400,
|
||||
height: 300
|
||||
}, app, scheme]);
|
||||
|
||||
this.interval = null;
|
||||
}
|
||||
|
||||
ApplicationProcessViewerWindow.prototype = Object.create(Window.prototype);
|
||||
ApplicationProcessViewerWindow.constructor = Window.prototype;
|
||||
|
||||
ApplicationProcessViewerWindow.prototype.init = function(wm, app, scheme) {
|
||||
var root = Window.prototype.init.apply(this, arguments);
|
||||
|
||||
// Load and set up scheme (GUI) here
|
||||
scheme.render(this, 'ProcessViewerWindow', root);
|
||||
|
||||
var view = scheme.find(this, 'View');
|
||||
|
||||
function update() {
|
||||
var now = new Date();
|
||||
var rows = [];
|
||||
API.getProcesses().forEach(function(p) {
|
||||
if ( p ) {
|
||||
var alive = now - p.__started;
|
||||
var iter = {
|
||||
value: p.__pid,
|
||||
id: p.__pid,
|
||||
columns: [
|
||||
{label: p.__pname},
|
||||
{label: p.__pid.toString(), textalign: 'right'},
|
||||
{label: alive.toString(), textalign: 'right'}
|
||||
]
|
||||
};
|
||||
|
||||
rows.push(iter);
|
||||
}
|
||||
});
|
||||
|
||||
view.patch(rows);
|
||||
}
|
||||
|
||||
view.set('columns', [
|
||||
{label: 'Name'},
|
||||
{label: 'PID', size: '60px', textalign: 'right'},
|
||||
{label: 'Alive', size: '60px', textalign: 'right'}
|
||||
]);
|
||||
|
||||
scheme.find(this, 'ButtonKill').on('click', function() {
|
||||
var selected = view.get('selected');
|
||||
if ( selected && selected[0] && typeof selected[0].data !== 'undefined' ) {
|
||||
API.kill(selected[0].data);
|
||||
}
|
||||
});
|
||||
|
||||
this.interval = setInterval(function() {
|
||||
update();
|
||||
}, 1000);
|
||||
|
||||
update();
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationProcessViewerWindow.prototype.destroy = function() {
|
||||
Window.prototype.destroy.apply(this, arguments);
|
||||
this.interval = clearInterval(this.interval);
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationProcessViewer = function(args, metadata) {
|
||||
Application.apply(this, ['ApplicationProcessViewer', args, metadata]);
|
||||
};
|
||||
|
||||
ApplicationProcessViewer.prototype = Object.create(Application.prototype);
|
||||
ApplicationProcessViewer.constructor = Application;
|
||||
|
||||
ApplicationProcessViewer.prototype.destroy = function() {
|
||||
return Application.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationProcessViewer.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.apply(this, arguments);
|
||||
this._addWindow(new ApplicationProcessViewerWindow(this, metadata, scheme));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationProcessViewer = OSjs.Applications.ApplicationProcessViewer || {};
|
||||
OSjs.Applications.ApplicationProcessViewer.Class = Object.seal(ApplicationProcessViewer);
|
||||
|
||||
})(OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
54
build/htdocs/dist/packages/default/ProcessViewer/metadata.json
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"className": "ApplicationProcessViewer",
|
||||
"name": "Process Viewer",
|
||||
"description": "View running processes",
|
||||
"names": {
|
||||
"bg_BG": "Процеси",
|
||||
"de_DE": "Prozess-Manager",
|
||||
"fr_FR": "Gestionnaire de processus",
|
||||
"it_IT": "Gestore Attività",
|
||||
"ko_KR": "프로세스 관리자",
|
||||
"nl_NL": "Proces manager",
|
||||
"no_NO": "Prosess oversikt",
|
||||
"pl_PL": "Procesy",
|
||||
"ru_RU": "Менеджер процессов",
|
||||
"sk_SK": "Správca procesov",
|
||||
"tr_TR": "İşlemleri Görüntüle",
|
||||
"vi_VN": "Xem tiến trình"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Преглед на процеси",
|
||||
"de_DE": "Laufende Prozesse verwalten",
|
||||
"fr_FR": "Visualiser les processus en cours",
|
||||
"it_IT": "Mostri processi attivi",
|
||||
"ko_KR": "실행 중인 프로세스를 관리합니다",
|
||||
"nl_NL": "Bekijk de lopende processen",
|
||||
"no_NO": "Se oversikt over kjørende prosesser",
|
||||
"pl_PL": "Zobacz działające procesy",
|
||||
"ru_RU": "Менеджер запущенных процессов",
|
||||
"sk_SK": "Spravovanie bežiacich procesov",
|
||||
"tr_TR": "çalışan işlemleri görüntüle",
|
||||
"vi_VN": "Xem các tiến trình đang chạy"
|
||||
},
|
||||
"singular": true,
|
||||
"category": "system",
|
||||
"icon": "apps/gnome-monitor.png",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/ProcessViewer",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
16
build/htdocs/dist/packages/default/ProcessViewer/scheme.html
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<application-window data-id="ProcessViewerWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-fill="true">
|
||||
<gui-list-view data-id="View" data-multiple="false">
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonKill">LBL_KILL</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
51
build/htdocs/dist/packages/default/Settings/api.js
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* See http://os.js.org/doc/tutorials/application-with-server-api.html
|
||||
*/
|
||||
|
||||
//
|
||||
// Run `app._api('test', {}, fn)` in client to reach this
|
||||
//
|
||||
module.exports.test = function(args, callback, request, response) {
|
||||
callback(false, 'test');
|
||||
};
|
||||
|
||||
//
|
||||
// This is called whenever the HTTP server starts up
|
||||
//
|
||||
module.exports._onServerStart = function(server, instance, metadata) {
|
||||
};
|
||||
|
||||
})();
|
||||
|
108
build/htdocs/dist/packages/default/Settings/combined.css
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
.ApplicationSettingsWindow application-window-content {
|
||||
overflow : hidden;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content gui-expander {
|
||||
margin-bottom : 5px;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="ContainerButtons"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="ContainerContent"] {
|
||||
overflow : hidden;
|
||||
display : none;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="SoundsList"] {
|
||||
height : 150px;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="HotkeysList"] {
|
||||
height : 200px;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="UsersList"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="InstalledPackages"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="PackagePaths"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="PanelItems"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="MountList"],
|
||||
.ApplicationSettingsWindow application-window-content [data-id="SearchPaths"] {
|
||||
height : 140px;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="ContainerContent"] > div {
|
||||
overflow : auto;
|
||||
height : 100%;
|
||||
width : 100%;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content [data-id="ContainerSelection"] {
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content .ListView {
|
||||
overflow : hidden;
|
||||
height : 100%;
|
||||
width : 100%;
|
||||
}
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div {
|
||||
min-height : 32px;
|
||||
}
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div > ul {
|
||||
list-style : none;
|
||||
margin : 0;
|
||||
padding : 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div > ul > li {
|
||||
box-sizing : border-box;
|
||||
display : inline-block;
|
||||
margin : 0;
|
||||
padding : 10px;
|
||||
text-align : center;
|
||||
cursor : pointer;
|
||||
width : 90px;
|
||||
height : 70px;
|
||||
pointer-events: all;
|
||||
}
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div > ul > li * {
|
||||
pointer-events : none;
|
||||
}
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div > ul > li > span {
|
||||
display : block;
|
||||
}
|
||||
|
||||
.ApplicationSettingsWindow application-window-content .ListView > div > span {
|
||||
display : block;
|
||||
font-weight : bold;
|
||||
margin-bottom : 5px;
|
||||
pointer-events: none;
|
||||
}
|
2724
build/htdocs/dist/packages/default/Settings/combined.js
vendored
Normal file
57
build/htdocs/dist/packages/default/Settings/metadata.json
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"className": "ApplicationSettings",
|
||||
"preloadParallel": true,
|
||||
"name": "Settings",
|
||||
"mime": null,
|
||||
"icon": "categories/applications-system.png",
|
||||
"category": "system",
|
||||
"singular": true,
|
||||
"names": {
|
||||
"bg_BG": "Настройки",
|
||||
"de_DE": "Einstellungen",
|
||||
"es_ES": "Settings",
|
||||
"fr_FR": "Paramètres",
|
||||
"it_IT": "Settaggi",
|
||||
"ko_KR": "환경설정",
|
||||
"nl_NL": "Instellingen",
|
||||
"no_NO": "Instillinger",
|
||||
"pl_PL": "Ustawienia",
|
||||
"ru_RU": "Настройки",
|
||||
"sk_SK": "Nastavenia",
|
||||
"tr_TR": "Ayarlar",
|
||||
"vi_VN": "Cài đặt"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Настройки",
|
||||
"de_DE": "Einstellungen",
|
||||
"es_ES": "Settings",
|
||||
"fr_FR": "Paramètres",
|
||||
"it_IT": "Settaggi",
|
||||
"ko_KR": "환경설정",
|
||||
"nl_NL": "Instellingen",
|
||||
"no_NO": "Instillinger",
|
||||
"pl_PL": "Ustawienia",
|
||||
"ru_RU": "Настройки",
|
||||
"sk_SK": "Nastavenia",
|
||||
"tr_TR": "Program Ayarlarını düzenle",
|
||||
"vi_VN": "Cài đặt"
|
||||
},
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Settings",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
655
build/htdocs/dist/packages/default/Settings/scheme.html
vendored
Normal file
@ -0,0 +1,655 @@
|
||||
<application-window data-id="SettingsWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-fill="true" data-id="ContainerSelection">
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-grow="1" data-fill="true" data-id="ContainerContent">
|
||||
<div data-module="Desktop">
|
||||
<gui-expander data-label="LBL_WINDOWMANAGER">
|
||||
<gui-fragment data-fragment-id="ModuleDesktopWMFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_DESKTOP">
|
||||
<gui-fragment data-fragment-id="ModuleDesktopFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="Icon View">
|
||||
<gui-fragment data-fragment-id="ModuleDesktopIconViewFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleDesktopWMFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label data-id="DesktopMarginLabel">Desktop Margin</gui-label>
|
||||
<gui-slider data-id="DesktopMargin" data-min="0" data-max="50"></gui-slider>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label data-id="CornerSnappingLabel">Desktop Corner Snapping</gui-label>
|
||||
<gui-slider data-id="CornerSnapping" data-min="0" data-max="50"></gui-slider>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label data-id="WindowSnappingLabel">Window Snapping</gui-label>
|
||||
<gui-slider data-id="WindowSnapping" data-min="0" data-max="50"></gui-slider>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Window Switcher</gui-label>
|
||||
<gui-switch data-id="EnableWindowSwitcher"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Animations</gui-label>
|
||||
<gui-switch data-id="EnableAnimations"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleDesktopIconViewFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Icon View</gui-label>
|
||||
<gui-switch data-id="EnableIconView"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Invert Text Color</gui-label>
|
||||
<gui-switch data-id="EnableIconViewInvert"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleDesktopFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable TouchMenu</gui-label>
|
||||
<gui-switch data-id="EnableTouchMenu"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Input">
|
||||
<gui-expander data-label="LBL_HOTKEYS">
|
||||
<gui-fragment data-fragment-id="ModuleInputFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_HOTKEYS">
|
||||
<gui-fragment data-fragment-id="ModuleInputShortcutsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleInputFragment">
|
||||
<gui-vbox class="block-label">
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Hotkeys</gui-label>
|
||||
<gui-switch data-id="EnableHotkeys"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleInputShortcutsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="HotkeysList" data-multiple="false">
|
||||
<gui-list-view-head>
|
||||
<gui-list-view-row>
|
||||
<gui-list-view-column>LBL_NAME</gui-list-view-column>
|
||||
<gui-list-view-column data-size="100px" data-resizable="true">LBL_HOTKEY</gui-list-view-column>
|
||||
</gui-list-view-row>
|
||||
</gui-list-view-head>
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="HotkeysEdit" data-icon="stock://16x16/actions/system-run.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Locale">
|
||||
<gui-expander data-label="LBL_LOCALES">
|
||||
<gui-fragment data-fragment-id="ModuleLocalesFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleLocalesFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Language (requires restart)</gui-label>
|
||||
<gui-select data-id="UserLocale"></gui-select>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Panel">
|
||||
<gui-expander data-label="LBL_OPTIONS">
|
||||
<gui-fragment data-fragment-id="ModulePanelAppearance"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_ITEMS">
|
||||
<gui-fragment data-fragment-id="ModulePanelItems"></gui-fragment>
|
||||
</gui-expander>
|
||||
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModulePanelAppearance">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_POSITION</gui-label>
|
||||
<gui-select data-id="PanelPosition"></gui-select>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_AUTOHIDE</gui-label>
|
||||
<gui-switch data-id="PanelAutoHide"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_ONTOP</gui-label>
|
||||
<gui-switch data-id="PanelOntop"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_BACKGROUND_COLOR</gui-label>
|
||||
<gui-input-modal data-id="PanelBackgroundColor"></gui-input-modal>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_TEXT_COLOR</gui-label>
|
||||
<gui-input-modal data-id="PanelForegroundColor"></gui-input-modal>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_OPACITY</gui-label>
|
||||
<gui-slider data-id="PanelOpacity" data-min="0" data-max="100"></gui-slider>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModulePanelItems">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="PanelItems" data-multiple="false"></gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="PanelButtonAdd" data-icon="stock://16x16/actions/add.png"></gui-button>
|
||||
<gui-button data-id="PanelButtonRemove" data-icon="stock://16x16/actions/remove.png"></gui-button>
|
||||
<gui-button data-id="PanelButtonUp" data-icon="stock://16x16/actions/up.png"></gui-button>
|
||||
<gui-button data-id="PanelButtonDown" data-icon="stock://16x16/actions/down.png"></gui-button>
|
||||
<gui-button data-id="PanelButtonOptions" data-icon="stock://16x16/actions/system-run.png"></gui-button>
|
||||
<gui-button data-id="PanelButtonReset" data-icon="stock://16x16/actions/revert.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Packages">
|
||||
<gui-expander data-label="Package Visibility">
|
||||
<gui-fragment data-fragment-id="ModulePackageVisibilityFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="Package Locations">
|
||||
<gui-fragment data-fragment-id="ModulePackagePathsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModulePackageVisibilityFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="InstalledPackages" data-multiple="false">
|
||||
<gui-list-view-head>
|
||||
<gui-list-view-row>
|
||||
<gui-list-view-column data-size="40px">LBL_HIDE</gui-list-view-column>
|
||||
<gui-list-view-column data-size="100px" data-resizable="true">LBL_APPLICATION</gui-list-view-column>
|
||||
<gui-list-view-column data-size="50px" data-resizable="true">LBL_SCOPE</gui-list-view-column>
|
||||
<gui-list-view-column>Name</gui-list-view-column>
|
||||
</gui-list-view-row>
|
||||
</gui-list-view-head>
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonUninstall" data-disabled="true">LBL_UNINSTALL</gui-button>
|
||||
<gui-button data-id="ButtonSaveHidden">LBL_SAVE</gui-button>
|
||||
<gui-button data-id="ButtonRegen">LBL_REGENERATE</gui-button>
|
||||
<gui-button data-id="ButtonZipInstall">Install from zip</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModulePackagePathsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="PackagePaths" data-multiple="false"></gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="PackagePathsAdd" data-icon="stock://16x16/actions/add.png"></gui-button>
|
||||
<gui-button data-id="PackagePathsRemove" data-icon="stock://16x16/actions/remove.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Store">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1" data-fill="true">
|
||||
<gui-list-view data-id="AppStorePackages" data-multiple="false">
|
||||
<gui-list-view-head>
|
||||
<gui-list-view-row>
|
||||
<gui-list-view-column>LBL_NAME</gui-list-view-column>
|
||||
<gui-list-view-column data-size="100px">LBL_REPOSITORY</gui-list-view-column>
|
||||
<gui-list-view-column data-size="50px" data-resizable="true">LBL_VERSION</gui-list-view-column>
|
||||
<gui-list-view-column data-size="100px" data-resizable="true">LBL_AUTHOR</gui-list-view-column>
|
||||
</gui-list-view-row>
|
||||
</gui-list-view-head>
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonStoreRefresh">LBL_REFRESH</gui-button>
|
||||
<gui-button data-id="ButtonStoreInstall">LBL_INSTALL</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</div>
|
||||
|
||||
<div data-module="Search">
|
||||
<gui-expander data-label="Search Options">
|
||||
<gui-fragment data-fragment-id="ModuleSearchOptionsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="Search Locations">
|
||||
<gui-fragment data-fragment-id="ModuleSearchLocationsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleSearchOptionsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Application Search</gui-label>
|
||||
<gui-switch data-id="SearchEnableApplications"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable File Search</gui-label>
|
||||
<gui-switch data-id="SearchEnableFiles"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleSearchLocationsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="SearchPaths" data-multiple="false"></gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="SearchAdd" data-icon="stock://16x16/actions/add.png"></gui-button>
|
||||
<gui-button data-id="SearchRemove" data-icon="stock://16x16/actions/remove.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Sounds">
|
||||
<gui-expander data-label="Sound Theme">
|
||||
<gui-fragment data-fragment-id="ModuleSoundThemeFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_SOUNDS">
|
||||
<gui-fragment data-fragment-id="ModuleSoundMapFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleSoundThemeFragment">
|
||||
<gui-vbox class="block-label">
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-select data-id="SoundThemeName"></gui-select>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Enable Sounds</gui-label>
|
||||
<gui-switch data-id="EnableSounds"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleSoundMapFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="SoundsList" data-multiple="false">
|
||||
<gui-list-view-head>
|
||||
<gui-list-view-row>
|
||||
<gui-list-view-column>LBL_NAME</gui-list-view-column>
|
||||
<gui-list-view-column data-size="100px" data-resizable="true">LBL_FILENAME</gui-list-view-column>
|
||||
</gui-list-view-row>
|
||||
</gui-list-view-head>
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="SoundsEdit" data-icon="stock://16x16/actions/system-run.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
|
||||
<div data-module="Theme">
|
||||
<gui-expander data-label="LBL_THEME">
|
||||
<gui-fragment data-fragment-id="ModuleThemeFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_BACKGROUND">
|
||||
<gui-fragment data-fragment-id="ModuleBackgroundFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_FONTS">
|
||||
<gui-fragment data-fragment-id="ModuleFontFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleThemeFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_THEME</gui-label>
|
||||
<gui-select data-id="StyleThemeName"></gui-select>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_ICONS</gui-label>
|
||||
<gui-select data-id="IconThemeName"></gui-select>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleBackgroundFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_BACKGROUND_IMAGE</gui-label>
|
||||
<gui-input-modal data-id="BackgroundImage"></gui-input-modal>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_BACKGROUND_COLOR</gui-label>
|
||||
<gui-input-modal data-id="BackgroundColor"></gui-input-modal>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>Background Type</gui-label>
|
||||
<gui-select data-id="BackgroundStyle"></gui-select>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleFontFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_FONT</gui-label>
|
||||
<gui-input-modal data-id="FontName"></gui-input-modal>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="User">
|
||||
<gui-expander data-label="LBL_INFORMATION">
|
||||
<gui-fragment data-fragment-id="ModuleUserInformationFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleUserInformationFragment">
|
||||
<gui-vbox class="block-label">
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_ID</gui-label>
|
||||
<gui-text data-id="UserID" data-disabled="true"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_NAME</gui-label>
|
||||
<gui-text data-id="UserName" data-disabled="true"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_USERNAME</gui-label>
|
||||
<gui-text data-id="UserUsername" data-disabled="true"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_GROUPS</gui-label>
|
||||
<gui-text data-id="UserGroups" data-disabled="true"></gui-text>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="VFS">
|
||||
<gui-expander data-label="File View Options">
|
||||
<gui-fragment data-fragment-id="ModuleVFSViewOptionsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
<gui-expander data-label="LBL_MOUNTS">
|
||||
<gui-fragment data-fragment-id="ModuleVFSMountsFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleVFSViewOptionsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_SHOW_HIDDENFILES</gui-label>
|
||||
<gui-switch data-id="ShowHiddenFiles"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-label>LBL_SHOW_FILEEXTENSIONS</gui-label>
|
||||
<gui-switch data-id="ShowFileExtensions"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<application-fragment data-id="ModuleVFSMountsFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="MountList" data-multiple="false"></gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="MountAdd" data-icon="stock://16x16/actions/add.png"></gui-button>
|
||||
<gui-button data-id="MountRemove" data-icon="stock://16x16/actions/remove.png"></gui-button>
|
||||
<gui-button data-id="MountEdit" data-icon="stock://16x16/actions/system-run.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
<div data-module="Users">
|
||||
<gui-expander data-label="LBL_USERS">
|
||||
<gui-fragment data-fragment-id="ModuleUsersFragment"></gui-fragment>
|
||||
</gui-expander>
|
||||
</div>
|
||||
|
||||
<application-fragment data-id="ModuleUsersFragment">
|
||||
<gui-vbox class="block-label">
|
||||
<gui-vbox-container data-shrink="1" data-grow="1">
|
||||
<gui-list-view data-id="UsersList" data-multiple="false">
|
||||
<gui-list-view-head>
|
||||
<gui-list-view-row>
|
||||
<gui-list-view-column data-size="100px">LBL_USERNAME</gui-list-view-column>
|
||||
<gui-list-view-column>LBL_NAME</gui-list-view-column>
|
||||
</gui-list-view-row>
|
||||
</gui-list-view-head>
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-expand="true">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="UsersAdd" data-icon="stock://16x16/actions/add.png"></gui-button>
|
||||
<gui-button data-id="UsersRemove" data-icon="stock://16x16/actions/remove.png"></gui-button>
|
||||
<gui-button data-id="UsersEdit" data-icon="stock://16x16/actions/system-run.png"></gui-button>
|
||||
<gui-button data-id="UsersPasswd" data-icon="stock://16x16/status/dialog-password.png"></gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-fragment>
|
||||
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end" data-id="ContainerButtons">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonOK">LBL_SAVE</gui-button>
|
||||
<gui-button data-id="ButtonCancel">LBL_BACK</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
||||
|
||||
<application-window data-id="PanelSettingWindow">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-fill="true">
|
||||
<gui-list-view data-id="List" data-multiple="false">
|
||||
</gui-list-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonPanelOK">LBL_OK</gui-button>
|
||||
<gui-button data-id="ButtonPanelCancel">LBL_CANCEL</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</application-window>
|
||||
|
||||
<application-window data-id="SettingsMountWindow">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-shrink="1" data-fill="true">
|
||||
|
||||
<gui-scroll-view>
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_TYPE</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-select data-id="MountType">
|
||||
<gui-select-option data-value="WebDAV">WebDAV (OwnCloud)</gui-select-option>
|
||||
</gui-select>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_NAME</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="MountName" data-placeholder="mydav"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_DESCRIPTION</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="MountDescription" data-placeholder="My DAV"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
|
||||
<gui-vbox-container data-grow="1">
|
||||
<gui-expander data-label="LBL_SETTINGS" data-expanded="false">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_HOST</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="MountHost" data-placeholder="http://127.0.0.1/remote.php/webdav/"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_NAMESPACE</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="MountNamespace" data-placeholder="DAV"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_USERNAME</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="MountUsername" data-placeholder="username"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_PASSWORD</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-password data-id="MountPassword" data-placeholder="password"></gui-password>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>CORS Enabled</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-switch data-id="MountCORS"></gui-switch>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
</gui-expander>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
</gui-scroll-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonOK">LBL_CONNECT</gui-button>
|
||||
<gui-button data-id="ButtonClose">LBL_CLOSE</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
||||
|
||||
<application-window data-id="SettingsUserWindow">
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-grow="1" data-shrink="1" data-fill="true">
|
||||
|
||||
<gui-scroll-view>
|
||||
<gui-vbox>
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_USERNAME</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="UserUsername" data-placeholder="johndoe"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_NAME</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="UserName" data-placeholder="John Doe"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1">
|
||||
<gui-label>LBL_GROUPS</gui-label>
|
||||
</gui-vbox-container>
|
||||
<gui-vbox-container data-expand="true">
|
||||
<gui-text data-id="UserGroups" data-placeholder="[]"></gui-text>
|
||||
</gui-vbox-container>
|
||||
|
||||
</gui-vbox>
|
||||
</gui-scroll-view>
|
||||
</gui-vbox-container>
|
||||
|
||||
<gui-vbox-container data-shrink="1" data-align="end">
|
||||
<gui-button-bar>
|
||||
<gui-button data-id="ButtonOK">LBL_SAVE</gui-button>
|
||||
<gui-button data-id="ButtonClose">LBL_CLOSE</gui-button>
|
||||
</gui-button-bar>
|
||||
</gui-vbox-container>
|
||||
</gui-vbox>
|
||||
|
||||
</application-window>
|
33
build/htdocs/dist/packages/default/Textpad/combined.css
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationTextpadWindow {
|
||||
}*/
|
||||
|
119
build/htdocs/dist/packages/default/Textpad/combined.js
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(DefaultApplication, DefaultApplicationWindow, Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationTextpadWindow(app, metadata, scheme, file) {
|
||||
DefaultApplicationWindow.apply(this, ['ApplicationTextpadWindow', {
|
||||
allow_drop: true,
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
width: 450,
|
||||
height: 300
|
||||
}, app, scheme, file]);
|
||||
}
|
||||
|
||||
ApplicationTextpadWindow.prototype = Object.create(DefaultApplicationWindow.prototype);
|
||||
ApplicationTextpadWindow.constructor = DefaultApplicationWindow.prototype;
|
||||
|
||||
ApplicationTextpadWindow.prototype.init = function(wmRef, app, scheme) {
|
||||
var root = DefaultApplicationWindow.prototype.init.apply(this, arguments);
|
||||
var self = this;
|
||||
|
||||
// Load and set up scheme (GUI) here
|
||||
scheme.render(this, 'TextpadWindow', root);
|
||||
scheme.find(this, 'Text').on('change', function() {
|
||||
self.hasChanged = true;
|
||||
});
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationTextpadWindow.prototype.updateFile = function(file) {
|
||||
DefaultApplicationWindow.prototype.updateFile.apply(this, arguments);
|
||||
this._scheme.find(this, 'Text').$element.focus();
|
||||
};
|
||||
|
||||
ApplicationTextpadWindow.prototype.showFile = function(file, content) {
|
||||
this._scheme.find(this, 'Text').set('value', content || '');
|
||||
DefaultApplicationWindow.prototype.showFile.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationTextpadWindow.prototype.getFileData = function() {
|
||||
return this._scheme.find(this, 'Text').get('value');
|
||||
};
|
||||
|
||||
ApplicationTextpadWindow.prototype._focus = function() {
|
||||
if ( DefaultApplicationWindow.prototype._focus.apply(this, arguments) ) {
|
||||
if ( this._scheme ) {
|
||||
var input = this._scheme.find(this, 'Text').$element;
|
||||
if ( input ) {
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ApplicationTextpad = function(args, metadata) {
|
||||
DefaultApplication.apply(this, ['ApplicationTextpad', args, metadata, {
|
||||
extension: 'txt',
|
||||
mime: 'text/plain',
|
||||
filename: 'New text file.txt'
|
||||
}]);
|
||||
};
|
||||
|
||||
ApplicationTextpad.prototype = Object.create(DefaultApplication.prototype);
|
||||
ApplicationTextpad.constructor = DefaultApplication;
|
||||
|
||||
ApplicationTextpad.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.call(this, settings, metadata, scheme);
|
||||
var file = this._getArgument('file');
|
||||
this._addWindow(new ApplicationTextpadWindow(this, metadata, scheme, file));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationTextpad = OSjs.Applications.ApplicationTextpad || {};
|
||||
OSjs.Applications.ApplicationTextpad.Class = Object.seal(ApplicationTextpad);
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
62
build/htdocs/dist/packages/default/Textpad/metadata.json
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"className": "ApplicationTextpad",
|
||||
"name": "Textpad",
|
||||
"description": "Simple text editor",
|
||||
"names": {
|
||||
"bg_BG": "Текстов редактор",
|
||||
"de_DE": "Texteditor",
|
||||
"fr_FR": "Éditeur de texte",
|
||||
"it_IT": "Editor Testi",
|
||||
"ko_KR": "텍스트패드",
|
||||
"nl_NL": "Notities",
|
||||
"no_NO": "Tekstblokk",
|
||||
"pl_PL": "Notatnik",
|
||||
"ru_RU": "Редактор текста",
|
||||
"sk_SK": "Poznámkový blok",
|
||||
"tr_TR": "Basit Bir Metin Düzenleyicisi",
|
||||
"vi_VN": "Trình sửa văn bản"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Стандартен текстов редактор",
|
||||
"de_DE": "Einfacher Texteditor",
|
||||
"fr_FR": "Éditeur de texte simple",
|
||||
"it_IT": "Semplice editor di testi",
|
||||
"ko_KR": "간단한 텍스트 편집기",
|
||||
"nl_NL": "Eenvoudige Tekstverwerker",
|
||||
"no_NO": "Simpel tekst redigering",
|
||||
"pl_PL": "Prosty edytor tekstu",
|
||||
"ru_RU": "Простой текстовый редактор",
|
||||
"sk_SK": "Jednoduchý textový editor",
|
||||
"tr_TR": "Basit Bir Metin Düzenleyicisi",
|
||||
"vi_VN": "Trình sửa văn bản đơn giản"
|
||||
},
|
||||
"mime": [
|
||||
"^text",
|
||||
"inode\\/x\\-empty",
|
||||
"application\\/x\\-empty",
|
||||
"application\\/x\\-lua",
|
||||
"application\\/x\\-python",
|
||||
"application\\/javascript",
|
||||
"application\\/json"
|
||||
],
|
||||
"category": "utilities",
|
||||
"icon": "apps/accessories-text-editor.png",
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Textpad",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
36
build/htdocs/dist/packages/default/Textpad/scheme.html
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
<application-window data-id="TextpadWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuNew" data-label="LBL_NEW"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSave" data-label="LBL_SAVE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSaveAs" data-label="LBL_SAVEAS"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-textarea data-id="Text"></gui-textarea>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- STATUSBAR -->
|
||||
<!--
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-statusbar data-id="Statusbar"></gui-statusbar>
|
||||
</gui-vbox-container>
|
||||
-->
|
||||
|
||||
</gui-vbox>
|
||||
|
||||
|
||||
</application-window>
|
33
build/htdocs/dist/packages/default/Writer/combined.css
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2015, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
|
||||
/*.ApplicationWriterWindow application-window-content {
|
||||
}*/
|
||||
|
461
build/htdocs/dist/packages/default/Writer/combined.js
vendored
Normal file
@ -0,0 +1,461 @@
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(Application, Window, GUI, Dialogs, VFS, Utils) {
|
||||
// jscs:disable validateQuoteMarks
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// LOCALES
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var _Locales = {
|
||||
bg_BG : {
|
||||
'Insert URL' : 'Въведи URL'
|
||||
},
|
||||
de_DE : {
|
||||
'Insert URL' : 'URL einfügen'
|
||||
},
|
||||
es_ES : {
|
||||
'Insert URL' : 'Insertar URL'
|
||||
},
|
||||
fr_FR : {
|
||||
'Insert URL' : 'Insérer une URL'
|
||||
},
|
||||
ar_DZ : {
|
||||
'Insert URL' : 'أدخل رابط'
|
||||
},
|
||||
it_IT : {
|
||||
'Insert URL' : 'Inserisci URL'
|
||||
},
|
||||
ko_KR : {
|
||||
'Insert URL' : '링크 삽입'
|
||||
},
|
||||
nl_NL : {
|
||||
'Insert URL' : 'URL invoegen'
|
||||
},
|
||||
no_NO : {
|
||||
'Insert URL' : 'Sett inn URL'
|
||||
},
|
||||
pl_PL : {
|
||||
'Insert URL' : 'Wpisz URL'
|
||||
},
|
||||
ru_RU : {
|
||||
'Insert URL' : 'Вставить ссылку'
|
||||
},
|
||||
sk_SK : {
|
||||
'Insert URL' : 'Vložiť URL'
|
||||
},
|
||||
tr_TR : {
|
||||
'Insert URL' : 'URL ekle'
|
||||
},
|
||||
vi_VN : {
|
||||
'Insert URL' : 'Thêm URL'
|
||||
}
|
||||
};
|
||||
|
||||
function _() {
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
args.unshift(_Locales);
|
||||
return OSjs.API.__.apply(this, args);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationWriter = OSjs.Applications.ApplicationWriter || {};
|
||||
OSjs.Applications.ApplicationWriter._ = _;
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.GUI, OSjs.Dialogs, OSjs.VFS, OSjs.Utils);
|
||||
|
||||
/*!
|
||||
* OS.js - JavaScript Cloud/Web Desktop Platform
|
||||
*
|
||||
* Copyright (c) 2011-2016, Anders Evenrud <andersevenrud@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @author Anders Evenrud <andersevenrud@gmail.com>
|
||||
* @licence Simplified BSD License
|
||||
*/
|
||||
(function(DefaultApplication, DefaultApplicationWindow, Application, Window, Utils, API, VFS, GUI) {
|
||||
'use strict';
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// WINDOWS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationWriterWindow(app, metadata, scheme, file) {
|
||||
/*eslint dot-notation: "off"*/
|
||||
var config = OSjs.Core.getConfig();
|
||||
|
||||
DefaultApplicationWindow.apply(this, ['ApplicationWriterWindow', {
|
||||
allow_drop: true,
|
||||
icon: metadata.icon,
|
||||
title: metadata.name,
|
||||
width: 550,
|
||||
height: 400
|
||||
}, app, scheme, file]);
|
||||
|
||||
this.checkChangeLength = -1;
|
||||
this.checkChangeInterval = null;
|
||||
this.color = {
|
||||
background : '#ffffff',
|
||||
foreground : '#000000'
|
||||
};
|
||||
this.font = {
|
||||
name: config.Fonts['default'],
|
||||
size: 3
|
||||
};
|
||||
}
|
||||
|
||||
ApplicationWriterWindow.prototype = Object.create(DefaultApplicationWindow.prototype);
|
||||
ApplicationWriterWindow.constructor = DefaultApplicationWindow.prototype;
|
||||
|
||||
ApplicationWriterWindow.prototype.destroy = function() {
|
||||
this.checkChangeInterval = clearInterval(this.checkChangeInterval);
|
||||
return DefaultApplicationWindow.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationWriterWindow.prototype.init = function(wmRef, app, scheme) {
|
||||
var root = DefaultApplicationWindow.prototype.init.apply(this, arguments);
|
||||
var self = this;
|
||||
var _ = OSjs.Applications.ApplicationWriter._;
|
||||
|
||||
// Load and set up scheme (GUI) here
|
||||
scheme.render(this, 'WriterWindow', root, null, null, {
|
||||
_: _
|
||||
});
|
||||
|
||||
var text = scheme.find(this, 'Text');
|
||||
|
||||
var buttons = {
|
||||
'text-bold': {
|
||||
command: 'bold'
|
||||
},
|
||||
'text-italic': {
|
||||
command: 'italic'
|
||||
},
|
||||
'text-underline': {
|
||||
command: 'underline'
|
||||
},
|
||||
'text-strikethrough': {
|
||||
command: 'strikeThrough'
|
||||
},
|
||||
|
||||
'justify-left': {
|
||||
command: 'justifyLeft'
|
||||
},
|
||||
'justify-center': {
|
||||
command: 'justifyCenter'
|
||||
},
|
||||
'justify-right': {
|
||||
command: 'justifyRight'
|
||||
},
|
||||
|
||||
'indent': {
|
||||
command: 'indent'
|
||||
},
|
||||
'unindent': {
|
||||
command: 'outdent'
|
||||
}
|
||||
};
|
||||
|
||||
var menuEntries = {
|
||||
'MenuUndo': function() {
|
||||
text._call('command', ['undo', false]);
|
||||
},
|
||||
'MenuRedo': function() {
|
||||
text._call('command', ['redo', false]);
|
||||
},
|
||||
'MenuCopy': function() {
|
||||
text._call('command', ['copy', false]);
|
||||
},
|
||||
'MenuCut': function() {
|
||||
text._call('command', ['cut', false]);
|
||||
},
|
||||
'MenuDelete': function() {
|
||||
text._call('command', ['delete', false]);
|
||||
},
|
||||
'MenuPaste': function() {
|
||||
text._call('command', ['paste', false]);
|
||||
},
|
||||
'MenuUnlink': function() {
|
||||
text._call('command', ['unlink', false]);
|
||||
},
|
||||
'MenuInsertOL': function() {
|
||||
text._call('command', ['insertOrderedList', false]);
|
||||
},
|
||||
'MenuInsertUL': function() {
|
||||
text._call('command', ['insertUnorderedList', false]);
|
||||
},
|
||||
'MenuInsertImage': function() {
|
||||
API.createDialog('File', {
|
||||
filter: ['^image']
|
||||
}, function(ev, button, result) {
|
||||
if ( button !== 'ok' || !result ) {
|
||||
return;
|
||||
}
|
||||
|
||||
VFS.url(result, function(error, url) {
|
||||
text._call('command', ['insertImage', false, url]);
|
||||
});
|
||||
}, self);
|
||||
},
|
||||
'MenuInsertLink': function() {
|
||||
API.createDialog('Input', {
|
||||
message: _('Insert URL'),
|
||||
placeholder: 'https://os.js.org'
|
||||
}, function(ev, button, result) {
|
||||
if ( button !== 'ok' || !result ) {
|
||||
return;
|
||||
}
|
||||
text._call('command', ['createLink', false, result]);
|
||||
}, self);
|
||||
}
|
||||
};
|
||||
|
||||
function menuEvent(ev) {
|
||||
if ( menuEntries[ev.detail.id] ) {
|
||||
menuEntries[ev.detail.id]();
|
||||
}
|
||||
}
|
||||
|
||||
scheme.find(this, 'SubmenuEdit').on('select', menuEvent);
|
||||
scheme.find(this, 'SubmenuInsert').on('select', menuEvent);
|
||||
|
||||
function getSelectionStyle() {
|
||||
function _call(cmd) {
|
||||
return text._call('query', [cmd]);
|
||||
}
|
||||
|
||||
var style = {
|
||||
fontName: ((_call('fontName') || '').split(',')[0]).replace(/^'/, '').replace(/'$/, ''),
|
||||
fontSize: parseInt(_call('fontSize'), 10) || self.font.size,
|
||||
foreColor: _call('foreColor'),
|
||||
hiliteColor: _call('hiliteColor')
|
||||
};
|
||||
|
||||
Object.keys(buttons).forEach(function(b) {
|
||||
var button = buttons[b];
|
||||
style[button.command] = {
|
||||
button: b,
|
||||
value:_call(button.command)
|
||||
};
|
||||
});
|
||||
return style;
|
||||
}
|
||||
|
||||
function createColorDialog(current, cb) {
|
||||
self._toggleDisabled(true);
|
||||
API.createDialog('Color', {
|
||||
color: current
|
||||
}, function(ev, button, result) {
|
||||
self._toggleDisabled(false);
|
||||
if ( button === 'ok' && result ) {
|
||||
cb(result.hex);
|
||||
}
|
||||
}, self);
|
||||
}
|
||||
|
||||
function createFontDialog(current, cb) {
|
||||
self._toggleDisabled(true);
|
||||
API.createDialog('Font', {
|
||||
fontSize: self.font.size,
|
||||
fontName: self.font.name,
|
||||
minSize: 1,
|
||||
maxSize: 8,
|
||||
unit: 'null'
|
||||
}, function(ev, button, result) {
|
||||
self._toggleDisabled(false);
|
||||
if ( button === 'ok' && result ) {
|
||||
cb(result);
|
||||
}
|
||||
}, self);
|
||||
}
|
||||
|
||||
var back = scheme.find(this, 'Background').on('click', function() {
|
||||
createColorDialog(self.color.background, function(hex) {
|
||||
text._call('command', ['hiliteColor', false, hex]);
|
||||
self.color.background = hex;
|
||||
back.set('value', hex);
|
||||
});
|
||||
});
|
||||
var front = scheme.find(this, 'Foreground').on('click', function() {
|
||||
createColorDialog(self.color.foreground, function(hex) {
|
||||
text._call('command', ['foreColor', false, hex]);
|
||||
self.color.foreground = hex;
|
||||
front.set('value', hex);
|
||||
});
|
||||
});
|
||||
|
||||
var font = scheme.find(this, 'Font').on('click', function() {
|
||||
createFontDialog(null, function(font) {
|
||||
text._call('command', ['fontName', false, font.fontName]);
|
||||
text._call('command', ['fontSize', false, font.fontSize]);
|
||||
self.font.name = font.fontName;
|
||||
self.font.size = font.fontSize;
|
||||
});
|
||||
});
|
||||
|
||||
root.querySelectorAll('gui-toolbar > gui-button').forEach(function(b) {
|
||||
var id = b.getAttribute('data-id');
|
||||
var button = buttons[id];
|
||||
if ( button ) {
|
||||
(new GUI.Element(b)).on('click', function() {
|
||||
text._call('command', [button.command]);
|
||||
}).on('mousedown', function(ev) {
|
||||
ev.preventDefault();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function updateToolbar(style) {
|
||||
back.set('value', style.hiliteColor);
|
||||
front.set('value', style.foreColor);
|
||||
if ( style.fontName ) {
|
||||
font.set('label', Utils.format('{0} ({1})', style.fontName, style.fontSize.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
function updateSelection() {
|
||||
var style = getSelectionStyle();
|
||||
updateToolbar(style);
|
||||
}
|
||||
|
||||
back.set('value', this.color.background);
|
||||
front.set('value', this.color.foreground);
|
||||
font.set('label', Utils.format('{0} ({1})', this.font.name, this.font.size.toString()));
|
||||
|
||||
text.on('selection', function() {
|
||||
updateSelection();
|
||||
});
|
||||
|
||||
this.checkChangeInterval = setInterval(function() {
|
||||
if ( self.hasChanged ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( self.checkChangeLength < 0 ) {
|
||||
self.checkChangeLength = text.get('value').length;
|
||||
}
|
||||
|
||||
var len = text.get('value').length;
|
||||
if ( len !== self.checkChangeLength ) {
|
||||
self.hasChanged = true;
|
||||
}
|
||||
self.checkChangeLength = len;
|
||||
}, 500);
|
||||
|
||||
return root;
|
||||
};
|
||||
|
||||
ApplicationWriterWindow.prototype.updateFile = function(file) {
|
||||
DefaultApplicationWindow.prototype.updateFile.apply(this, arguments);
|
||||
|
||||
try {
|
||||
var el = this._scheme.find(this, 'Text');
|
||||
el.$element.focus();
|
||||
} catch ( e ) {}
|
||||
|
||||
this.checkChangeLength = -1;
|
||||
};
|
||||
|
||||
ApplicationWriterWindow.prototype.showFile = function(file, content) {
|
||||
this._scheme.find(this, 'Text').set('value', content || '');
|
||||
DefaultApplicationWindow.prototype.showFile.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationWriterWindow.prototype.getFileData = function() {
|
||||
return this._scheme.find(this, 'Text').get('value');
|
||||
};
|
||||
|
||||
ApplicationWriterWindow.prototype._focus = function(file, content) {
|
||||
if ( DefaultApplicationWindow.prototype._focus.apply(this, arguments) ) {
|
||||
this._scheme.find(this, 'Text').focus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// APPLICATION
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function ApplicationWriter(args, metadata) {
|
||||
DefaultApplication.apply(this, ['ApplicationWriter', args, metadata, {
|
||||
extension: 'odoc',
|
||||
mime: 'osjs/document',
|
||||
filename: 'New text file.odoc'
|
||||
}]);
|
||||
}
|
||||
|
||||
ApplicationWriter.prototype = Object.create(DefaultApplication.prototype);
|
||||
ApplicationWriter.constructor = DefaultApplication;
|
||||
|
||||
ApplicationWriter.prototype.destroy = function() {
|
||||
return DefaultApplication.prototype.destroy.apply(this, arguments);
|
||||
};
|
||||
|
||||
ApplicationWriter.prototype.init = function(settings, metadata, scheme) {
|
||||
Application.prototype.init.call(this, settings, metadata, scheme);
|
||||
var file = this._getArgument('file');
|
||||
this._addWindow(new ApplicationWriterWindow(this, metadata, scheme, file));
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// EXPORTS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OSjs.Applications = OSjs.Applications || {};
|
||||
OSjs.Applications.ApplicationWriter = OSjs.Applications.ApplicationWriter || {};
|
||||
OSjs.Applications.ApplicationWriter.Class = Object.seal(ApplicationWriter);
|
||||
|
||||
})(OSjs.Helpers.DefaultApplication, OSjs.Helpers.DefaultApplicationWindow, OSjs.Core.Application, OSjs.Core.Window, OSjs.Utils, OSjs.API, OSjs.VFS, OSjs.GUI);
|
60
build/htdocs/dist/packages/default/Writer/metadata.json
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"className": "ApplicationWriter",
|
||||
"name": "Writer",
|
||||
"description": "Write rich text documents",
|
||||
"names": {
|
||||
"bg_BG": "Текст",
|
||||
"de_DE": "Writer",
|
||||
"fr_FR": "Traitement de texte",
|
||||
"it_IT": "Editor Testi",
|
||||
"ko_KR": "글쓰기",
|
||||
"nl_NL": "Tekstverwerker",
|
||||
"no_NO": "Writer",
|
||||
"pl_PL": "Writer",
|
||||
"ru_RU": "Текстовый процессор",
|
||||
"sk_SK": "Writer",
|
||||
"tr_TR": "Writer",
|
||||
"vi_VN": "Viết"
|
||||
},
|
||||
"descriptions": {
|
||||
"bg_BG": "Писанене на обогатен текст",
|
||||
"de_DE": "Verfassen Sie Rich-Text-Dokumente",
|
||||
"fr_FR": "Traitement de texte riche",
|
||||
"it_IT": "Scrivi documenti di testo formattati",
|
||||
"ko_KR": "리치 텍스트 문서 작성",
|
||||
"nl_NL": "Tekst verwerker met opmaak",
|
||||
"no_NO": "Skriv riktekst dokumenter",
|
||||
"pl_PL": "Twórz dokumenty rich text",
|
||||
"ru_RU": "Текстовый процессор",
|
||||
"sk_SK": "Editor na tvorbu Rich-Text dokumentov",
|
||||
"tr_TR": "Gelişmiş dökümanlar oluşturun",
|
||||
"vi_VN": "Xem, chỉnh sửa văn bản"
|
||||
},
|
||||
"mime": [
|
||||
"^text",
|
||||
"osjs\\/document"
|
||||
],
|
||||
"category": "office",
|
||||
"icon": "apps/libreoffice34-writer.png",
|
||||
"compability": [
|
||||
"richtext"
|
||||
],
|
||||
"preload": [
|
||||
{
|
||||
"type": "javascript",
|
||||
"src": "combined.js"
|
||||
},
|
||||
{
|
||||
"type": "stylesheet",
|
||||
"src": "combined.css"
|
||||
},
|
||||
{
|
||||
"src": "scheme.html",
|
||||
"type": "scheme"
|
||||
}
|
||||
],
|
||||
"type": "application",
|
||||
"path": "default/Writer",
|
||||
"build": {},
|
||||
"repo": "default"
|
||||
}
|
90
build/htdocs/dist/packages/default/Writer/scheme.html
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
<application-window data-id="WriterWindow">
|
||||
|
||||
<gui-vbox>
|
||||
<!-- MENU BAR -->
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-menu-bar>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_FILE">
|
||||
<gui-menu data-id="SubmenuFile">
|
||||
<gui-menu-entry data-id="MenuNew" data-label="LBL_NEW"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuOpen" data-label="LBL_OPEN"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSave" data-label="LBL_SAVE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuSaveAs" data-label="LBL_SAVEAS"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuClose" data-label="LBL_CLOSE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_EDIT">
|
||||
<gui-menu data-id="SubmenuEdit">
|
||||
<gui-menu-entry data-id="MenuUndo" data-label="LBL_UNDO"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuRedo" data-label="LBL_REDO"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuCut" data-label="LBL_CUT"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuCopy" data-label="LBL_COPY"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuPaste" data-label="LBL_PASTE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuDelete" data-label="LBL_DELETE"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuUnlink" data-label="LBL_UNLINK"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
<gui-menu-bar-entry data-label="LBL_INSERT">
|
||||
<gui-menu data-id="SubmenuInsert">
|
||||
<gui-menu-entry data-id="MenuInsertOL" data-label="LBL_ORDERED_LIST"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuInsertUL" data-label="LBL_UNORDERED_LIST"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuInsertLink" data-label="LBL_LINK"></gui-menu-entry>
|
||||
<gui-menu-entry data-id="MenuInsertImage" data-label="LBL_IMAGE"></gui-menu-entry>
|
||||
</gui-menu>
|
||||
</gui-menu-bar-entry>
|
||||
|
||||
</gui-menu-bar>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- TOOLS -->
|
||||
<gui-vbox-container data-shrink="1" data-basis="auto" data-expand="true">
|
||||
|
||||
<gui-toolbar>
|
||||
<gui-button data-id="text-bold" data-icon="stock://actions/format-text-bold.png"></gui-button>
|
||||
<gui-button data-id="text-italic" data-icon="stock://actions/format-text-italic.png"></gui-button>
|
||||
<gui-button data-id="text-underline" data-icon="stock://actions/format-text-underline.png"></gui-button>
|
||||
<gui-button data-id="text-strikethrough" data-icon="stock://actions/format-text-strikethrough.png"></gui-button>
|
||||
|
||||
<gui-toolbar-separator />
|
||||
|
||||
<gui-button data-id="justify-left" data-icon="stock://actions/format-justify-left.png"></gui-button>
|
||||
<gui-button data-id="justify-center" data-icon="stock://actions/format-justify-center.png"></gui-button>
|
||||
<gui-button data-id="justify-right" data-icon="stock://actions/format-justify-right.png"></gui-button>
|
||||
|
||||
<gui-toolbar-separator />
|
||||
|
||||
<gui-button data-id="indent" data-icon="stock://actions/gtk-indent-ltr.png"></gui-button>
|
||||
<gui-button data-id="unindent" data-icon="stock://actions/gtk-unindent-ltr.png"></gui-button>
|
||||
|
||||
<gui-toolbar-separator />
|
||||
|
||||
<gui-color-box data-id="Foreground"></gui-color-box>
|
||||
<gui-color-box data-id="Background"></gui-color-box>
|
||||
|
||||
<gui-toolbar-separator />
|
||||
|
||||
<gui-button data-id="Font" data-group="tool" data-tool-name="">FONT (SIZE)</gui-button>
|
||||
</gui-toolbar>
|
||||
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- CONTENT -->
|
||||
<gui-vbox-container data-grow="1" data-shrink="0" data-basis="auto" data-fill="true">
|
||||
<gui-richtext data-id="Text"></gui-richtext>
|
||||
</gui-vbox-container>
|
||||
|
||||
<!-- STATUSBAR -->
|
||||
<!--
|
||||
<gui-vbox-container data-grow="0" data-shrink="1" data-basis="auto">
|
||||
<gui-statusbar data-id="Statusbar"></gui-statusbar>
|
||||
</gui-vbox-container>
|
||||
-->
|
||||
|
||||
</gui-vbox>
|
||||
|
||||
|
||||
|
||||
</application-window>
|