diff --git a/.gitignore b/.gitignore
index f658d81..0a3189b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,5 @@
.settings
/config.php
/dbconfig.conf
-/webui/.htaccess
-/webui/tmp/*
+/public/.htaccess
+
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e456c05
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "externals/sihnon-js-lib"]
+ path = externals/sihnon-js-lib
+ url = ../sihnon-js-lib.git
diff --git a/build/ripping-cluster-worker.conf-gentoo b/build/ripping-cluster-worker.conf-gentoo
new file mode 100644
index 0000000..631bdb7
--- /dev/null
+++ b/build/ripping-cluster-worker.conf-gentoo
@@ -0,0 +1,5 @@
+# Which user to run the worker daemon as
+USER="media"
+
+# File to store the running daemon's PID in
+PID_FILE="/var/run/ripping-cluster-worker.pid"
diff --git a/build/ripping-cluster-worker.init-gentoo b/build/ripping-cluster-worker.init-gentoo
index 0abdb95..559f5fa 100644
--- a/build/ripping-cluster-worker.init-gentoo
+++ b/build/ripping-cluster-worker.init-gentoo
@@ -2,8 +2,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-PID_FILE="/var/run/ripping-cluster-worker.pid"
-
depend() {
need localmount net
use dns logger puppetmaster netmount nfsmount
@@ -13,7 +11,8 @@ start() {
ebegin "Starting ripping-cluster-worker"
start-stop-daemon --start --quiet \
--background --make-pidfile --pidfile ${PID_FILE} \
- --exec /usr/bin/php /usr/lib/ripping-cluster/worker/ripping-cluster-worker.php
+ --chuid ${USER} --user ${USER} \
+ --exec /usr/bin/php /usr/lib/ripping-cluster/source/worker/ripping-cluster-worker.php
eend $? "Failed to start ripping-cluster-worker"
}
@@ -22,8 +21,10 @@ stop() {
start-stop-daemon --stop --quiet \
--pidfile ${PID_FILE}
local ret=$?
- eend ${ret} "Failed to stop puppet"
- rm -f ${PID_FILE}
+
+ eend ${ret} "Failed to stop ripping-cluster-worker"
+ ${ret} || rm -f ${PID_FILE}
+
return ${ret}
}
diff --git a/build/schema/mysql.sql b/build/schema/mysql.sql
new file mode 100644
index 0000000..259c531
--- /dev/null
+++ b/build/schema/mysql.sql
@@ -0,0 +1,208 @@
+-- phpMyAdmin SQL Dump
+-- version 3.3.0
+-- http://www.phpmyadmin.net
+--
+-- Host: localhost:3306
+-- Generation Time: Jan 11, 2012 at 12:27 AM
+-- Server version: 5.1.53
+-- PHP Version: 5.3.6-pl1-gentoo
+
+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+
+--
+-- Database: `ripping-cluster`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `client_log`
+--
+
+DROP TABLE IF EXISTS `client_log`;
+CREATE TABLE IF NOT EXISTS `client_log` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `job_id` int(10) unsigned DEFAULT NULL,
+ `level` varchar(32) NOT NULL,
+ `category` varchar(32) NOT NULL,
+ `ctime` int(11) NOT NULL,
+ `pid` int(11) NOT NULL,
+ `hostname` varchar(32) NOT NULL,
+ `progname` varchar(64) NOT NULL,
+ `file` text NOT NULL,
+ `line` int(11) NOT NULL,
+ `message` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `job_id` (`job_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `jobs`
+--
+
+DROP TABLE IF EXISTS `jobs`;
+CREATE TABLE IF NOT EXISTS `jobs` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `source_plugin` varchar(255) NOT NULL COMMENT 'Partial classname of the plugin used to read the source',
+ `rip_plugin` varchar(255) NOT NULL COMMENT 'Partial classname of the plugin used to perform the rip',
+ `source` text NOT NULL,
+ `destination` text NOT NULL,
+ `title` varchar(64) NOT NULL,
+ `format` varchar(4) NOT NULL,
+ `video_codec` varchar(8) NOT NULL,
+ `video_width` int(11) DEFAULT NULL,
+ `video_height` int(11) DEFAULT NULL,
+ `quantizer` float NOT NULL,
+ `deinterlace` double NOT NULL,
+ `audio_tracks` varchar(64) NOT NULL,
+ `audio_codecs` varchar(64) NOT NULL,
+ `audio_names` varchar(255) NOT NULL,
+ `subtitle_tracks` varchar(64) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `job_status`
+--
+
+DROP TABLE IF EXISTS `job_status`;
+CREATE TABLE IF NOT EXISTS `job_status` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `job_id` int(10) unsigned NOT NULL,
+ `status` int(10) unsigned NOT NULL,
+ `ctime` int(10) unsigned NOT NULL,
+ `mtime` int(10) unsigned NOT NULL,
+ `rip_progress` double DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `job_id` (`job_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `job_status_current`
+--
+
+DROP TABLE IF EXISTS `job_status_current`;
+CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `handbrake_cluster`.`job_status_current` AS select `js`.`id` AS `id`,`js`.`job_id` AS `job_id`,`js`.`status` AS `status`,`js`.`ctime` AS `ctime`,`js`.`mtime` AS `mtime`,`js`.`rip_progress` AS `rip_progress` from (`handbrake_cluster`.`job_status` `js` join `handbrake_cluster`.`job_status_current_int` `js2`) where ((`js2`.`job_id` = `js`.`job_id`) and (`js`.`id` = `js2`.`latest`));
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `job_status_current_int`
+--
+
+DROP TABLE IF EXISTS `job_status_current_int`;
+CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `handbrake_cluster`.`job_status_current_int` AS (select `handbrake_cluster`.`job_status`.`job_id` AS `job_id`,max(`handbrake_cluster`.`job_status`.`id`) AS `latest` from `handbrake_cluster`.`job_status` group by `handbrake_cluster`.`job_status`.`job_id`);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `settings`
+--
+
+DROP TABLE IF EXISTS `settings`;
+CREATE TABLE IF NOT EXISTS `settings` (
+ `name` varchar(255) NOT NULL,
+ `value` text NOT NULL,
+ `type` enum('bool','int','float','string','array(string)','hash') DEFAULT 'string',
+ PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+--
+-- Dumping data for table `settings`
+--
+
+INSERT INTO `settings` (`name`, `value`, `type`) VALUES
+('debug.display_exceptions', '1', 'bool'),
+('rips.nice', '15', 'int'),
+('cache.base_dir', '/dev/shm/hbc/', 'string'),
+('rips.cache_ttl', '86400', 'int'),
+('rips.job_servers', 'localhost:7003', 'string'),
+('rips.context', 'dev', 'string'),
+('rips.default.output_directory', '', 'string'),
+('rips.handbrake_binary', '/usr/bin/HandBrakeCLI', 'string'),
+('rips.nice_binary', '/usr/bin/nice', 'string'),
+('source.handbrake.dir', '', 'array(string)'),
+('source.mkvinfo.dir', '', 'array(string)'),
+('source.bluray.dir', '', 'array(string)'),
+('logging.plugins', 'Database\nFlatFile\nConsole', 'array(string)'),
+('logging.Console', 'stdout', 'array(string)'),
+('logging.Console.stdout.format', '%ctime% %hostname%:%pid% %progname%:%file%[%line%] %message%', 'string'),
+('logging.Console.stdout.severity', 'debug\ninfo\nwarning\nerror', 'array(string)'),
+('logging.Console.stdout.category', 'client\nworker', 'array(string)'),
+('logging.Database', 'webui\nworker', 'array(string)'),
+('logging.Database.webui.table', 'client_log', 'string'),
+('logging.Database.webui.severity', 'debug\ninfo\nwarning\ndebug', 'array(string)'),
+('logging.Database.webui.category', 'batch\nclient\ndefault', 'array(string)'),
+('logging.Database.worker.table', 'worker_log', 'string'),
+('logging.Database.worker.severity', 'debug\ninfo\nwarning\nerror', 'array(string)'),
+('logging.Database.worker.category', 'worker', 'array(string)'),
+('logging.FlatFile', 'stderr\nvarlog_worker', 'array(string)'),
+('logging.FlatFile.stderr.filename', 'php://stderr', 'string'),
+('logging.FlatFile.stderr.format', '%timestamp% %hostname%:%pid% %progname%:%file%[%line%] %message%', 'string'),
+('logging.FlatFile.stderr.severity', 'warning\nerror', 'array(string)'),
+('logging.FlatFile.stderr.category', 'batch\nclient\ndefault\nworker', 'array(string)'),
+('logging.FlatFile.varlog_worker.filename', '/var/log/ripping-cluster/worker.log', 'string'),
+('logging.FlatFile.varlog_worker.format', '%timestamp% %hostname%:%pid% %progname%:%file%[%line%] %message%', 'string'),
+('logging.FlatFile.varlog_worker.severity', 'debug\ninfo\nwarning\nerror', 'array(string)'),
+('logging.FlatFile.varlog_worker.category', 'worker', 'array(string)'),
+('logging.Syslog', 'local0', 'array(string)'),
+('logging.Syslog.local0.facility', '128', 'int'),
+('logging.Syslog.local0.severity', 'debug\ninfo\nwarning\nerror', 'array(string)'),
+('logging.Syslog.local0.category', 'batch\nclient\ndefault\nworker', 'array(string)'),
+('logging.Syslog.local0.format', '%file%[%line%] %message%', 'string'),
+('templates.tmp_path', '/var/tmp/ripping-cluster', 'string'),
+('rips.temp_dir', '/tmp', 'string'),
+('job.logs.default_display_count', '30', 'int'),
+('job.logs.default_order', 'DESC', 'string'),
+('rips.output_directories.default', '', 'hash'),
+('rips.output_directories.recent', '', 'array(string)'),
+('rips.output_directories.recent_limit', '10', 'int'),
+('auth', 'Config', 'string'),
+('auth.admin.username', 'admin', 'string'),
+('auth.admin_password', '489152af89501a7dc72f6e589123b8c337c01623', 'string');
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `worker_log`
+--
+
+DROP TABLE IF EXISTS `worker_log`;
+CREATE TABLE IF NOT EXISTS `worker_log` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `job_id` int(10) unsigned DEFAULT NULL,
+ `level` varchar(32) NOT NULL,
+ `category` varchar(32) NOT NULL,
+ `ctime` int(11) NOT NULL,
+ `pid` int(11) NOT NULL,
+ `hostname` varchar(32) NOT NULL,
+ `progname` varchar(64) NOT NULL,
+ `file` text NOT NULL,
+ `line` int(11) NOT NULL,
+ `message` text NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `job_id` (`job_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+--
+-- Constraints for dumped tables
+--
+
+--
+-- Constraints for table `client_log`
+--
+ALTER TABLE `client_log`
+ ADD CONSTRAINT `client_log_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints for table `job_status`
+--
+ALTER TABLE `job_status`
+ ADD CONSTRAINT `job_status_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `jobs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/externals/sihnon-js-lib b/externals/sihnon-js-lib
new file mode 160000
index 0000000..0499e7e
--- /dev/null
+++ b/externals/sihnon-js-lib
@@ -0,0 +1 @@
+Subproject commit 0499e7ecaa888d72c624ccec2a84c0a55b505d7c
diff --git a/htaccess.dist b/private/htaccess.dist
similarity index 100%
rename from htaccess.dist
rename to private/htaccess.dist
diff --git a/webui/_inc.php b/public/_inc.php
similarity index 100%
rename from webui/_inc.php
rename to public/_inc.php
diff --git a/webui/a.php b/public/a.php
similarity index 100%
rename from webui/a.php
rename to public/a.php
diff --git a/webui/images/caution.png b/public/images/caution.png
similarity index 100%
rename from webui/images/caution.png
rename to public/images/caution.png
diff --git a/webui/images/clock.png b/public/images/clock.png
similarity index 100%
rename from webui/images/clock.png
rename to public/images/clock.png
diff --git a/webui/images/jquery.progressbar/progressbar.gif b/public/images/jquery.progressbar/progressbar.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbar.gif
rename to public/images/jquery.progressbar/progressbar.gif
diff --git a/webui/images/jquery.progressbar/progressbg_black.gif b/public/images/jquery.progressbar/progressbg_black.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbg_black.gif
rename to public/images/jquery.progressbar/progressbg_black.gif
diff --git a/webui/images/jquery.progressbar/progressbg_green.gif b/public/images/jquery.progressbar/progressbg_green.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbg_green.gif
rename to public/images/jquery.progressbar/progressbg_green.gif
diff --git a/webui/images/jquery.progressbar/progressbg_orange.gif b/public/images/jquery.progressbar/progressbg_orange.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbg_orange.gif
rename to public/images/jquery.progressbar/progressbg_orange.gif
diff --git a/webui/images/jquery.progressbar/progressbg_red.gif b/public/images/jquery.progressbar/progressbg_red.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbg_red.gif
rename to public/images/jquery.progressbar/progressbg_red.gif
diff --git a/webui/images/jquery.progressbar/progressbg_yellow.gif b/public/images/jquery.progressbar/progressbg_yellow.gif
similarity index 100%
rename from webui/images/jquery.progressbar/progressbg_yellow.gif
rename to public/images/jquery.progressbar/progressbg_yellow.gif
diff --git a/webui/images/redo.png b/public/images/redo.png
similarity index 100%
rename from webui/images/redo.png
rename to public/images/redo.png
diff --git a/webui/images/trash.png b/public/images/trash.png
similarity index 100%
rename from webui/images/trash.png
rename to public/images/trash.png
diff --git a/webui/index.php b/public/index.php
similarity index 100%
rename from webui/index.php
rename to public/index.php
diff --git a/public/scripts/3rdparty/bootstrap-alerts.js b/public/scripts/3rdparty/bootstrap-alerts.js
new file mode 100644
index 0000000..37bb430
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-alerts.js
@@ -0,0 +1,113 @@
+/* ==========================================================
+ * bootstrap-alerts.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var Alert = function ( content, options ) {
+ this.settings = $.extend({}, $.fn.alert.defaults, options)
+ this.$element = $(content)
+ .delegate(this.settings.selector, 'click', this.close)
+ }
+
+ Alert.prototype = {
+
+ close: function (e) {
+ var $element = $(this).parent('.alert-message')
+
+ e && e.preventDefault()
+ $element.removeClass('in')
+
+ function removeElement () {
+ $element.remove()
+ }
+
+ $.support.transition && $element.hasClass('fade') ?
+ $element.bind(transitionEnd, removeElement) :
+ removeElement()
+ }
+
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function ( options ) {
+
+ if ( options === true ) {
+ return this.data('alert')
+ }
+
+ return this.each(function () {
+ var $this = $(this)
+
+ if ( typeof options == 'string' ) {
+ return $this.data('alert')[options]()
+ }
+
+ $(this).data('alert', new Alert( this, options ))
+
+ })
+ }
+
+ $.fn.alert.defaults = {
+ selector: '.close'
+ }
+
+ $(document).ready(function () {
+ new Alert($('body'), {
+ selector: '.alert-message[data-alert] .close'
+ })
+ })
+
+}( window.jQuery || window.ender );
\ No newline at end of file
diff --git a/public/scripts/3rdparty/bootstrap-dropdown.js b/public/scripts/3rdparty/bootstrap-dropdown.js
new file mode 100644
index 0000000..cab0ec2
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-dropdown.js
@@ -0,0 +1,55 @@
+/* ============================================================
+ * bootstrap-dropdown.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#dropdown
+ * ============================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || d, 'click', function (e) {
+ var li = $(this).parent('li')
+ , isActive = li.hasClass('open')
+
+ clearMenus()
+ !isActive && li.toggleClass('open')
+ return false
+ })
+ })
+ }
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ var d = 'a.menu, .dropdown-toggle'
+
+ function clearMenus() {
+ $(d).parent('li').removeClass('open')
+ }
+
+ $(function () {
+ $('html').bind("click", clearMenus)
+ $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
+ })
+
+}( window.jQuery || window.ender );
\ No newline at end of file
diff --git a/public/scripts/3rdparty/bootstrap-modal.js b/public/scripts/3rdparty/bootstrap-modal.js
new file mode 100644
index 0000000..be2315a
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-modal.js
@@ -0,0 +1,260 @@
+/* =========================================================
+ * bootstrap-modal.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#modal
+ * =========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function( $ ){
+
+ "use strict"
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+
+ /* MODAL PUBLIC CLASS DEFINITION
+ * ============================= */
+
+ var Modal = function ( content, options ) {
+ this.settings = $.extend({}, $.fn.modal.defaults, options)
+ this.$element = $(content)
+ .delegate('.close', 'click.modal', $.proxy(this.hide, this))
+
+ if ( this.settings.show ) {
+ this.show()
+ }
+
+ return this
+ }
+
+ Modal.prototype = {
+
+ toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ this.isShown = true
+ this.$element.trigger('show')
+
+ escape.call(this)
+ backdrop.call(this, function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ that.$element
+ .appendTo(document.body)
+ .show()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element.addClass('in')
+
+ transition ?
+ that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
+ that.$element.trigger('shown')
+
+ })
+
+ return this
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ if ( !this.isShown ) {
+ return this
+ }
+
+ var that = this
+ this.isShown = false
+
+ escape.call(this)
+
+ this.$element
+ .trigger('hide')
+ .removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ hideWithTransition.call(this) :
+ hideModal.call(this)
+
+ return this
+ }
+
+ }
+
+
+ /* MODAL PRIVATE METHODS
+ * ===================== */
+
+ function hideWithTransition() {
+ // firefox drops transitionEnd events :{o
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.unbind(transitionEnd)
+ hideModal.call(that)
+ }, 500)
+
+ this.$element.one(transitionEnd, function () {
+ clearTimeout(timeout)
+ hideModal.call(that)
+ })
+ }
+
+ function hideModal (that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(this)
+ }
+
+ function backdrop ( callback ) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+ if ( this.isShown && this.settings.backdrop ) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('
')
+ .appendTo(document.body)
+
+ if ( this.settings.backdrop != 'static' ) {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
+
+ if ( doAnimate ) {
+ this.$backdrop[0].offsetWidth // force reflow
+ }
+
+ this.$backdrop.addClass('in')
+
+ doAnimate ?
+ this.$backdrop.one(transitionEnd, callback) :
+ callback()
+
+ } else if ( !this.isShown && this.$backdrop ) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
+ removeBackdrop.call(this)
+
+ } else if ( callback ) {
+ callback()
+ }
+ }
+
+ function removeBackdrop() {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ function escape() {
+ var that = this
+ if ( this.isShown && this.settings.keyboard ) {
+ $(document).bind('keyup.modal', function ( e ) {
+ if ( e.which == 27 ) {
+ that.hide()
+ }
+ })
+ } else if ( !this.isShown ) {
+ $(document).unbind('keyup.modal')
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.modal = function ( options ) {
+ var modal = this.data('modal')
+
+ if (!modal) {
+
+ if (typeof options == 'string') {
+ options = {
+ show: /show|toggle/.test(options)
+ }
+ }
+
+ return this.each(function () {
+ $(this).data('modal', new Modal(this, options))
+ })
+ }
+
+ if ( options === true ) {
+ return modal
+ }
+
+ if ( typeof options == 'string' ) {
+ modal[options]()
+ } else if ( modal ) {
+ modal.toggle()
+ }
+
+ return this
+ }
+
+ $.fn.modal.Modal = Modal
+
+ $.fn.modal.defaults = {
+ backdrop: false
+ , keyboard: false
+ , show: false
+ }
+
+
+ /* MODAL DATA- IMPLEMENTATION
+ * ========================== */
+
+ $(document).ready(function () {
+ $('body').delegate('[data-controls-modal]', 'click', function (e) {
+ e.preventDefault()
+ var $this = $(this).data('show', true)
+ $('#' + $this.attr('data-controls-modal')).modal( $this.data() )
+ })
+ })
+
+}( window.jQuery || window.ender );
\ No newline at end of file
diff --git a/public/scripts/3rdparty/bootstrap-popover.js b/public/scripts/3rdparty/bootstrap-popover.js
new file mode 100644
index 0000000..c637784
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-popover.js
@@ -0,0 +1,90 @@
+/* ===========================================================
+ * bootstrap-popover.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#popover
+ * ===========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function( $ ) {
+
+ "use strict"
+
+ var Popover = function ( element, options ) {
+ this.$element = $(element)
+ this.options = options
+ this.enabled = true
+ this.fixTitle()
+ }
+
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
+ ========================================= */
+
+ Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
+
+ setContent: function () {
+ var $tip = this.tip()
+ $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
+ $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
+ $tip[0].className = 'popover'
+ }
+
+ , hasContent: function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ , getContent: function () {
+ var content
+ , $e = this.$element
+ , o = this.options
+
+ if (typeof this.options.content == 'string') {
+ content = $e.attr(this.options.content)
+ } else if (typeof this.options.content == 'function') {
+ content = this.options.content.call(this.$element[0])
+ }
+
+ return content
+ }
+
+ , tip: function() {
+ if (!this.$tip) {
+ this.$tip = $('
')
+ .html(this.options.template)
+ }
+ return this.$tip
+ }
+
+ })
+
+
+ /* POPOVER PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.popover = function (options) {
+ if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
+ $.fn.twipsy.initWith.call(this, options, Popover, 'popover')
+ return this
+ }
+
+ $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
+ placement: 'right'
+ , content: 'data-content'
+ , template: '
'
+ })
+
+ $.fn.twipsy.rejectAttrOptions.push( 'content' )
+
+}( window.jQuery || window.ender );
\ No newline at end of file
diff --git a/public/scripts/3rdparty/bootstrap-tabs.js b/public/scripts/3rdparty/bootstrap-tabs.js
new file mode 100644
index 0000000..a3c7ee1
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-tabs.js
@@ -0,0 +1,80 @@
+/* ========================================================
+ * bootstrap-tabs.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function( $ ){
+
+ "use strict"
+
+ function activate ( element, container ) {
+ container
+ .find('> .active')
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if ( element.parent('.dropdown-menu') ) {
+ element.closest('li.dropdown').addClass('active')
+ }
+ }
+
+ function tab( e ) {
+ var $this = $(this)
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
+ , href = $this.attr('href')
+ , previous
+ , $href
+
+ if ( /^#\w+/.test(href) ) {
+ e.preventDefault()
+
+ if ( $this.parent('li').hasClass('active') ) {
+ return
+ }
+
+ previous = $ul.find('.active a').last()[0]
+ $href = $(href)
+
+ activate($this.parent('li'), $ul)
+ activate($href, $href.parent())
+
+ $this.trigger({
+ type: 'change'
+ , relatedTarget: previous
+ })
+ }
+ }
+
+
+ /* TABS/PILLS PLUGIN DEFINITION
+ * ============================ */
+
+ $.fn.tabs = $.fn.pills = function ( selector ) {
+ return this.each(function () {
+ $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
+ })
+ }
+
+ $(document).ready(function () {
+ $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
+ })
+
+}( window.jQuery || window.ender );
diff --git a/public/scripts/3rdparty/bootstrap-twipsy.js b/public/scripts/3rdparty/bootstrap-twipsy.js
new file mode 100644
index 0000000..5ebbddd
--- /dev/null
+++ b/public/scripts/3rdparty/bootstrap-twipsy.js
@@ -0,0 +1,321 @@
+/* ==========================================================
+ * bootstrap-twipsy.js v1.4.0
+ * http://twitter.github.com/bootstrap/javascript.html#twipsy
+ * Adapted from the original jQuery.tipsy by Jason Frame
+ * ==========================================================
+ * Copyright 2011 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function( $ ) {
+
+ "use strict"
+
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
+ * ======================================================= */
+
+ var transitionEnd
+
+ $(document).ready(function () {
+
+ $.support.transition = (function () {
+ var thisBody = document.body || document.documentElement
+ , thisStyle = thisBody.style
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
+ return support
+ })()
+
+ // set CSS transition event type
+ if ( $.support.transition ) {
+ transitionEnd = "TransitionEnd"
+ if ( $.browser.webkit ) {
+ transitionEnd = "webkitTransitionEnd"
+ } else if ( $.browser.mozilla ) {
+ transitionEnd = "transitionend"
+ } else if ( $.browser.opera ) {
+ transitionEnd = "oTransitionEnd"
+ }
+ }
+
+ })
+
+
+ /* TWIPSY PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Twipsy = function ( element, options ) {
+ this.$element = $(element)
+ this.options = options
+ this.enabled = true
+ this.fixTitle()
+ }
+
+ Twipsy.prototype = {
+
+ show: function() {
+ var pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , $tip
+ , tp
+
+ if (this.hasContent() && this.enabled) {
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animate) {
+ $tip.addClass('fade')
+ }
+
+ $tip
+ .remove()
+ .css({ top: 0, left: 0, display: 'block' })
+ .prependTo(document.body)
+
+ pos = $.extend({}, this.$element.offset(), {
+ width: this.$element[0].offsetWidth
+ , height: this.$element[0].offsetHeight
+ })
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
+
+ switch (placement) {
+ case 'below':
+ tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'above':
+ tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}
+ break
+ }
+
+ $tip
+ .css(tp)
+ .addClass(placement)
+ .addClass('in')
+ }
+ }
+
+ , setContent: function () {
+ var $tip = this.tip()
+ $tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
+ $tip[0].className = 'twipsy'
+ }
+
+ , hide: function() {
+ var that = this
+ , $tip = this.tip()
+
+ $tip.removeClass('in')
+
+ function removeElement () {
+ $tip.remove()
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip.bind(transitionEnd, removeElement) :
+ removeElement()
+ }
+
+ , fixTitle: function() {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
+ }
+ }
+
+ , hasContent: function () {
+ return this.getTitle()
+ }
+
+ , getTitle: function() {
+ var title
+ , $e = this.$element
+ , o = this.options
+
+ this.fixTitle()
+
+ if (typeof o.title == 'string') {
+ title = $e.attr(o.title == 'title' ? 'data-original-title' : o.title)
+ } else if (typeof o.title == 'function') {
+ title = o.title.call($e[0])
+ }
+
+ title = ('' + title).replace(/(^\s*|\s*$)/, "")
+
+ return title || o.fallback
+ }
+
+ , tip: function() {
+ return this.$tip = this.$tip || $('
').html(this.options.template)
+ }
+
+ , validate: function() {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ , enable: function() {
+ this.enabled = true
+ }
+
+ , disable: function() {
+ this.enabled = false
+ }
+
+ , toggleEnabled: function() {
+ this.enabled = !this.enabled
+ }
+
+ , toggle: function () {
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* TWIPSY PRIVATE METHODS
+ * ====================== */
+
+ function maybeCall ( thing, ctx, args ) {
+ return typeof thing == 'function' ? thing.apply(ctx, args) : thing
+ }
+
+ /* TWIPSY PLUGIN DEFINITION
+ * ======================== */
+
+ $.fn.twipsy = function (options) {
+ $.fn.twipsy.initWith.call(this, options, Twipsy, 'twipsy')
+ return this
+ }
+
+ $.fn.twipsy.initWith = function (options, Constructor, name) {
+ var twipsy
+ , binder
+ , eventIn
+ , eventOut
+
+ if (options === true) {
+ return this.data(name)
+ } else if (typeof options == 'string') {
+ twipsy = this.data(name)
+ if (twipsy) {
+ twipsy[options]()
+ }
+ return this
+ }
+
+ options = $.extend({}, $.fn[name].defaults, options)
+
+ function get(ele) {
+ var twipsy = $.data(ele, name)
+
+ if (!twipsy) {
+ twipsy = new Constructor(ele, $.fn.twipsy.elementOptions(ele, options))
+ $.data(ele, name, twipsy)
+ }
+
+ return twipsy
+ }
+
+ function enter() {
+ var twipsy = get(this)
+ twipsy.hoverState = 'in'
+
+ if (options.delayIn == 0) {
+ twipsy.show()
+ } else {
+ twipsy.fixTitle()
+ setTimeout(function() {
+ if (twipsy.hoverState == 'in') {
+ twipsy.show()
+ }
+ }, options.delayIn)
+ }
+ }
+
+ function leave() {
+ var twipsy = get(this)
+ twipsy.hoverState = 'out'
+ if (options.delayOut == 0) {
+ twipsy.hide()
+ } else {
+ setTimeout(function() {
+ if (twipsy.hoverState == 'out') {
+ twipsy.hide()
+ }
+ }, options.delayOut)
+ }
+ }
+
+ if (!options.live) {
+ this.each(function() {
+ get(this)
+ })
+ }
+
+ if (options.trigger != 'manual') {
+ binder = options.live ? 'live' : 'bind'
+ eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'
+ this[binder](eventIn, enter)[binder](eventOut, leave)
+ }
+
+ return this
+ }
+
+ $.fn.twipsy.Twipsy = Twipsy
+
+ $.fn.twipsy.defaults = {
+ animate: true
+ , delayIn: 0
+ , delayOut: 0
+ , fallback: ''
+ , placement: 'above'
+ , html: false
+ , live: false
+ , offset: 0
+ , title: 'title'
+ , trigger: 'hover'
+ , template: '
'
+ }
+
+ $.fn.twipsy.rejectAttrOptions = [ 'title' ]
+
+ $.fn.twipsy.elementOptions = function(ele, options) {
+ var data = $(ele).data()
+ , rejects = $.fn.twipsy.rejectAttrOptions
+ , i = rejects.length
+
+ while (i--) {
+ delete data[rejects[i]]
+ }
+
+ return $.extend({}, options, data)
+ }
+
+}( window.jQuery || window.ender );
\ No newline at end of file
diff --git a/webui/scripts/3rdparty/jquery.asmselect.js b/public/scripts/3rdparty/jquery.asmselect.js
similarity index 100%
rename from webui/scripts/3rdparty/jquery.asmselect.js
rename to public/scripts/3rdparty/jquery.asmselect.js
diff --git a/public/scripts/3rdparty/jquery.chained.js b/public/scripts/3rdparty/jquery.chained.js
new file mode 100644
index 0000000..23cd701
--- /dev/null
+++ b/public/scripts/3rdparty/jquery.chained.js
@@ -0,0 +1,73 @@
+/*
+ * Chained - jQuery non AJAX(J) chained selects plugin
+ *
+ * Copyright (c) 2010-2011 Mika Tuupola
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ */
+
+(function($) {
+
+ $.fn.chained = function(parent_selector, options) {
+
+ return this.each(function() {
+
+ /* Save this to self because this changes when scope changes. */
+ var self = this;
+ var backup = $(self).clone();
+
+ /* Handles maximum two parents now. */
+ $(parent_selector).each(function() {
+
+ $(this).bind("change", function() {
+ $(self).html(backup.html());
+
+ /* If multiple parents build classname like foo\bar. */
+ var selected = "";
+ $(parent_selector).each(function() {
+ selected += "\\" + $(":selected", this).val();
+ });
+ selected = selected.substr(1);
+
+ /* Also check for first parent without subclassing. */
+ /* TODO: This should be dynamic and check for each parent */
+ /* without subclassing. */
+ var first = $(parent_selector).first();
+ var selected_first = $(":selected", first).val();
+
+ $("option", self).each(function() {
+ /* Remove unneeded items but save the default value. */
+ if (!$(this).hasClass(selected) &&
+ !$(this).hasClass(selected_first) && $(this).val() !== "") {
+ $(this).remove();
+ }
+ });
+
+ /* If we have only the default value disable select. */
+ if (1 == $("option", self).size() && $(self).val() === "") {
+ $(self).attr("disabled", "disabled");
+ } else {
+ $(self).removeAttr("disabled");
+ }
+ $(self).trigger("change");
+ });
+
+ /* Force IE to see something selected on first page load, */
+ /* unless something is already selected */
+ if ( !$("option:selected", this).length ) {
+ $("option", this).first().attr("selected", "selected");
+ }
+
+ /* Force updating the children. */
+ $(this).trigger("change");
+
+ });
+ });
+ };
+
+ /* Alias for those who like to use more English like syntax. */
+ $.fn.chainedTo = $.fn.chained;
+
+})(jQuery);
\ No newline at end of file
diff --git a/webui/scripts/3rdparty/jquery.jec-1.3.2.js b/public/scripts/3rdparty/jquery.jec-1.3.2.js
similarity index 100%
rename from webui/scripts/3rdparty/jquery.jec-1.3.2.js
rename to public/scripts/3rdparty/jquery.jec-1.3.2.js
diff --git a/webui/scripts/3rdparty/jquery.progressbar.min.js b/public/scripts/3rdparty/jquery.progressbar.min.js
similarity index 100%
rename from webui/scripts/3rdparty/jquery.progressbar.min.js
rename to public/scripts/3rdparty/jquery.progressbar.min.js
diff --git a/public/scripts/3rdparty/less-1.1.5.min.js b/public/scripts/3rdparty/less-1.1.5.min.js
new file mode 100644
index 0000000..92930af
--- /dev/null
+++ b/public/scripts/3rdparty/less-1.1.5.min.js
@@ -0,0 +1,16 @@
+//
+// LESS - Leaner CSS v1.1.5
+// http://lesscss.org
+//
+// Copyright (c) 2009-2011, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+//
+// LESS - Leaner CSS v1.1.5
+// http://lesscss.org
+//
+// Copyright (c) 2009-2011, Alexis Sellier
+// Licensed under the Apache 2.0 License.
+//
+(function(a,b){function c(b){return a.less[b.split("/")[1]]}function l(){var a=document.getElementsByTagName("style");for(var b=0;b0?d.firstChild.nodeValue!==a.nodeValue&&d.replaceChild(a,d.firstChild):d.appendChild(a)})(document.createTextNode(a));c&&g&&(t("saving "+e+" to cache."),g.setItem(e,a),g.setItem(e+":timestamp",c))}function q(a,b,c,e){function i(b,c,d){b.status>=200&&b.status<300?c(b.responseText,b.getResponseHeader("Last-Modified")):typeof d=="function"&&d(b.status,a)}var g=r(),h=f?!1:d.async;typeof g.overrideMimeType=="function"&&g.overrideMimeType("text/css"),g.open("GET",a,h),g.setRequestHeader("Accept",b||"text/x-less, text/css; q=0.9, */*; q=0.5"),g.send(null),f?g.status===0?c(g.responseText):e(g.status,a):h?g.onreadystatechange=function(){g.readyState==4&&i(g,c,e)}:i(g,c,e)}function r(){if(a.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch(b){return t("browser doesn't support AJAX."),null}}function s(a){return a&&a.parentNode.removeChild(a)}function t(a){d.env=="development"&&typeof console!="undefined"&&console.log("less: "+a)}function u(a,b){var c="less-error-message:"+o(b),e=["",'[-1] {0} ',"[0] {current} ",'[1] {2} '," "].join("\n"),f=document.createElement("div"),g,h;f.id=c,f.className="less-error-message",h=""+(a.message||"There is an error in your .less file")+" "+''+b+" ",a.extract&&(h+="on line "+a.line+", column "+(a.column+1)+":
"+e.replace(/\[(-?\d)\]/g,function(b,c){return parseInt(a.line)+parseInt(c)||""}).replace(/\{(\d)\}/g,function(b,c){return a.extract[parseInt(c)]||""}).replace(/\{current\}/,a.extract[1].slice(0,a.column)+''+a.extract[1].slice(a.column)+" ")),f.innerHTML=h,p([".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #ee4444;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.ctx {","color: #dd4444;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),f.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),d.env=="development"&&(g=setInterval(function(){document.body&&(document.getElementById(c)?document.body.replaceChild(f,document.getElementById(c)):document.body.insertBefore(f,document.body.firstChild),clearInterval(g))},10))}Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"||a instanceof Array}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=this.length>>>0;for(var d=0;d>>0,c=new Array(b),d=arguments[1];for(var e=0;e>>0,c=0;if(b===0&&arguments.length===1)throw new TypeError;if(arguments.length>=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=b)return-1;c<0&&(c+=b);for(;ck&&(j[f]=j[f].slice(c-k),k=c)}function s(a){var d,e,g,h,i,m,n,o;if(a instanceof Function)return a.call(l.parsers);if(typeof a=="string")d=b.charAt(c)===a?a:null,g=1,r();else{r();if(d=a.exec(j[f]))g=d[0].length;else return null}if(d){o=c+=g,m=c+j[f].length-g;while(c0)throw{type:"Syntax",message:"Missing closing `}`",filename:a.filename};return c.map(function(a){return a.join("")})}([[]]),h=new e.Ruleset([],s(this.parsers.primary)),h.root=!0,h.toCSS=function(c){var d,f,g;return function(g,h){function n(a){return a?(b.slice(0,a).match(/\n/g)||"").length:null}var i=[];g=g||{},typeof h=="object"&&!Array.isArray(h)&&(h=Object.keys(h).map(function(a){var b=h[a];return b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b])),new e.Rule("@"+a,b,!1,0)}),i=[new e.Ruleset(null,h)]);try{var j=c.call(this,{frames:i}).toCSS([],{compress:g.compress||!1})}catch(k){f=b.split("\n"),d=n(k.index);for(var l=k.index,m=-1;l>=0&&b.charAt(l)!=="\n";l--)m++;throw{type:k.type,message:k.message,filename:a.filename,index:k.index,line:typeof d=="number"?d+1:null,callLine:k.call&&n(k.call)+1,callExtract:f[n(k.call)],stack:k.stack,column:m,extract:[f[d-1],f[d],f[d+1]]}}return g.compress?j.replace(/(\s)+/g,"$1"):j}}(h.eval);if(c=0&&b.charAt(v)!=="\n";v--)w++;u={name:"ParseError",message:"Syntax Error on line "+p,index:c,filename:a.filename,line:p,column:w,extract:[q[p-2],q[p-1],q[p]]}}this.imports.queue.length>0?n=function(){g(u,h)}:g(u,h)},parsers:{primary:function(){var a,b=[];while((a=s(this.mixin.definition)||s(this.rule)||s(this.ruleset)||s(this.mixin.call)||s(this.comment)||s(this.directive))||s(/^[\s\n]+/))a&&b.push(a);return b},comment:function(){var a;if(b.charAt(c)!=="/")return;if(b.charAt(c+1)==="/")return new e.Comment(s(/^\/\/.*/),!0);if(a=s(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))return new e.Comment(a)},entities:{quoted:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)!=='"'&&b.charAt(d)!=="'")return;f&&s("~");if(a=s(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/))return new e.Quoted(a[0],a[1]||a[2],f)},keyword:function(){var a;if(a=s(/^[_A-Za-z-][_A-Za-z0-9-]*/))return new e.Keyword(a)},call:function(){var a,b,d=c;if(!(a=/^([\w-]+|%)\(/.exec(j[f])))return;a=a[1].toLowerCase();if(a==="url")return null;c+=a.length;if(a==="alpha")return s(this.alpha);s("("),b=s(this.entities.arguments);if(!s(")"))return;if(a)return new e.Call(a,b,d)},arguments:function(){var a=[],b;while(b=s(this.expression)){a.push(b);if(!s(","))break}return a},literal:function(){return s(this.entities.dimension)||s(this.entities.color)||s(this.entities.quoted)},url:function(){var a;if(b.charAt(c)!=="u"||!s(/^url\(/))return;a=s(this.entities.quoted)||s(this.entities.variable)||s(this.entities.dataURI)||s(/^[-\w%@$\/.&=:;#+?~]+/)||"";if(!s(")"))throw new Error("missing closing ) for url()");return new e.URL(a.value||a.data||a instanceof e.Variable?a:new e.Anonymous(a),o.paths)},dataURI:function(){var a;if(s(/^data:/)){a={},a.mime=s(/^[^\/]+\/[^,;)]+/)||"",a.charset=s(/^;\s*charset=[^,;)]+/)||"",a.base64=s(/^;\s*base64/)||"",a.data=s(/^,\s*[^)]+/);if(a.data)return a}},variable:function(){var a,d=c;if(b.charAt(c)==="@"&&(a=s(/^@@?[\w-]+/)))return new e.Variable(a,d)},color:function(){var a;if(b.charAt(c)==="#"&&(a=s(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Color(a[1])},dimension:function(){var a,d=b.charCodeAt(c);if(d>57||d<45||d===47)return;if(a=s(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/))return new e.Dimension(a[1],a[2])},javascript:function(){var a,d=c,f;b.charAt(d)==="~"&&(d++,f=!0);if(b.charAt(d)!=="`")return;f&&s("~");if(a=s(/^`([^`]*)`/))return new e.JavaScript(a[1],c,f)}},variable:function(){var a;if(b.charAt(c)==="@"&&(a=s(/^(@[\w-]+)\s*:/)))return a[1]},shorthand:function(){var a,b;if(!t(/^[@\w.%-]+\/[@\w.-]+/))return;if((a=s(this.entity))&&s("/")&&(b=s(this.entity)))return new e.Shorthand(a,b)},mixin:{call:function(){var a=[],d,f,g,h=c,i=b.charAt(c);if(i!=="."&&i!=="#")return;while(d=s(/^[#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/))a.push(new e.Element(f,d,c)),f=s(">");s("(")&&(g=s(this.entities.arguments))&&s(")");if(a.length>0&&(s(";")||t("}")))return new e.mixin.Call(a,g,h)},definition:function(){var a,d=[],f,g,h,i;if(b.charAt(c)!=="."&&b.charAt(c)!=="#"||t(/^[^{]*(;|})/))return;if(f=s(/^([#.](?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+)\s*\(/)){a=f[1];while(h=s(this.entities.variable)||s(this.entities.literal)||s(this.entities.keyword)){if(h instanceof e.Variable)if(s(":"))if(i=s(this.expression))d.push({name:h.name,value:i});else throw new Error("Expected value");else d.push({name:h.name});else d.push({value:h});if(!s(","))break}if(!s(")"))throw new Error("Expected )");g=s(this.block);if(g)return new e.mixin.Definition(a,d,g)}}},entity:function(){return s(this.entities.literal)||s(this.entities.variable)||s(this.entities.url)||s(this.entities.call)||s(this.entities.keyword)||s(this.entities.javascript)||s(this.comment)},end:function(){return s(";")||t("}")},alpha:function(){var a;if(!s(/^\(opacity=/i))return;if(a=s(/^\d+/)||s(this.entities.variable)){if(!s(")"))throw new Error("missing closing ) for alpha()");return new e.Alpha(a)}},element:function(){var a,b,d;d=s(this.combinator),a=s(/^(?:\d+\.\d+|\d+)%/)||s(/^(?:[.#]?|:*)(?:[\w-]|\\(?:[a-fA-F0-9]{1,6} ?|[^a-fA-F0-9]))+/)||s("*")||s(this.attribute)||s(/^\([^)@]+\)/);if(a)return new e.Element(d,a,c);if(d.value&&d.value.charAt(0)==="&")return new e.Element(d,null,c)},combinator:function(){var a,d=b.charAt(c);if(d===">"||d==="+"||d==="~"){c++;while(b.charAt(c)===" ")c++;return new e.Combinator(d)}if(d==="&"){a="&",c++,b.charAt(c)===" "&&(a="& ");while(b.charAt(c)===" ")c++;return new e.Combinator(a)}if(d===":"&&b.charAt(c+1)===":"){c+=2;while(b.charAt(c)===" ")c++;return new e.Combinator("::")}return b.charAt(c-1)===" "?new e.Combinator(" "):new e.Combinator(null)},selector:function(){var a,d,f=[],g,h;while(d=s(this.element)){g=b.charAt(c),f.push(d);if(g==="{"||g==="}"||g===";"||g===",")break}if(f.length>0)return new e.Selector(f)},tag:function(){return s(/^[a-zA-Z][a-zA-Z-]*[0-9]?/)||s("*")},attribute:function(){var a="",b,c,d;if(!s("["))return;if(b=s(/^[a-zA-Z-]+/)||s(this.entities.quoted))(d=s(/^[|~*$^]?=/))&&(c=s(this.entities.quoted)||s(/^[\w-]+/))?a=[b,d,c.toCSS?c.toCSS():c].join(""):a=b;if(!s("]"))return;if(a)return"["+a+"]"},block:function(){var a;if(s("{")&&(a=s(this.primary))&&s("}"))return a},ruleset:function(){var a=[],b,d,f;p();while(b=s(this.selector)){a.push(b),s(this.comment);if(!s(","))break;s(this.comment)}if(a.length>0&&(d=s(this.block)))return new e.Ruleset(a,d);i=c,q()},rule:function(){var a,d,g=b.charAt(c),k,l;p();if(g==="."||g==="#"||g==="&")return;if(a=s(this.variable)||s(this.property)){a.charAt(0)!="@"&&(l=/^([^@+\/'"*`(;{}-]*);/.exec(j[f]))?(c+=l[0].length-1,d=new e.Anonymous(l[1])):a==="font"?d=s(this.font):d=s(this.value),k=s(this.important);if(d&&s(this.end))return new e.Rule(a,d,k,h);i=c,q()}},"import":function(){var a;if(s(/^@import\s+/)&&(a=s(this.entities.quoted)||s(this.entities.url))&&s(";"))return new e.Import(a,o)},directive:function(){var a,d,f,g;if(b.charAt(c)!=="@")return;if(d=s(this["import"]))return d;if(a=s(/^@media|@page/)||s(/^@(?:-webkit-|-moz-)?keyframes/)){g=(s(/^[^{]+/)||"").trim();if(f=s(this.block))return new e.Directive(a+" "+g,f)}else if(a=s(/^@[-a-z]+/))if(a==="@font-face"){if(f=s(this.block))return new e.Directive(a,f)}else if((d=s(this.entity))&&s(";"))return new e.Directive(a,d)},font:function(){var a=[],b=[],c,d,f,g;while(g=s(this.shorthand)||s(this.entity))b.push(g);a.push(new e.Expression(b));if(s(","))while(g=s(this.expression)){a.push(g);if(!s(","))break}return new e.Value(a)},value:function(){var a,b=[],c;while(a=s(this.expression)){b.push(a);if(!s(","))break}if(b.length>0)return new e.Value(b)},important:function(){if(b.charAt(c)==="!")return s(/^! *important/)},sub:function(){var a;if(s("(")&&(a=s(this.expression))&&s(")"))return a},multiplication:function(){var a,b,c,d;if(a=s(this.operand)){while((c=s("/")||s("*"))&&(b=s(this.operand)))d=new e.Operation(c,[d||a,b]);return d||a}},addition:function(){var a,d,f,g;if(a=s(this.multiplication)){while((f=s(/^[-+]\s+/)||b.charAt(c-1)!=" "&&(s("+")||s("-")))&&(d=s(this.multiplication)))g=new e.Operation(f,[g||a,d]);return g||a}},operand:function(){var a,d=b.charAt(c+1);b.charAt(c)==="-"&&(d==="@"||d==="(")&&(a=s("-"));var f=s(this.sub)||s(this.entities.dimension)||s(this.entities.color)||s(this.entities.variable)||s(this.entities.call);return a?new e.Operation("*",[new e.Dimension(-1),f]):f},expression:function(){var a,b,c=[],d;while(a=s(this.addition)||s(this.entity))c.push(a);if(c.length>0)return new e.Expression(c)},property:function(){var a;if(a=s(/^(\*?-?[-a-z_0-9]+)\s*:/))return a[1]}}}};if(d.mode==="browser"||d.mode==="rhino")d.Parser.importer=function(a,b,c,d){a.charAt(0)!=="/"&&b.length>0&&(a=b[0]+a),n({href:a,title:a,type:d.mime},c,!0)};(function(a){function b(b){return a.functions.hsla(b.h,b.s,b.l,b.a)}function c(b){if(b instanceof a.Dimension)return parseFloat(b.unit=="%"?b.value/100:b.value);if(typeof b=="number")return b;throw{error:"RuntimeError",message:"color functions take numbers as parameters"}}function d(a){return Math.min(1,Math.max(0,a))}a.functions={rgb:function(a,b,c){return this.rgba(a,b,c,1)},rgba:function(b,d,e,f){var g=[b,d,e].map(function(a){return c(a)}),f=c(f);return new a.Color(g,f)},hsl:function(a,b,c){return this.hsla(a,b,c,1)},hsla:function(a,b,d,e){function h(a){return a=a<0?a+1:a>1?a-1:a,a*6<1?g+(f-g)*a*6:a*2<1?f:a*3<2?g+(f-g)*(2/3-a)*6:g}a=c(a)%360/360,b=c(b),d=c(d),e=c(e);var f=d<=.5?d*(b+1):d+b-d*b,g=d*2-f;return this.rgba(h(a+1/3)*255,h(a)*255,h(a-1/3)*255,e)},hue:function(b){return new a.Dimension(Math.round(b.toHSL().h))},saturation:function(b){return new a.Dimension(Math.round(b.toHSL().s*100),"%")},lightness:function(b){return new a.Dimension(Math.round(b.toHSL().l*100),"%")},alpha:function(b){return new a.Dimension(b.toHSL().a)},saturate:function(a,c){var e=a.toHSL();return e.s+=c.value/100,e.s=d(e.s),b(e)},desaturate:function(a,c){var e=a.toHSL();return e.s-=c.value/100,e.s=d(e.s),b(e)},lighten:function(a,c){var e=a.toHSL();return e.l+=c.value/100,e.l=d(e.l),b(e)},darken:function(a,c){var e=a.toHSL();return e.l-=c.value/100,e.l=d(e.l),b(e)},fadein:function(a,c){var e=a.toHSL();return e.a+=c.value/100,e.a=d(e.a),b(e)},fadeout:function(a,c){var e=a.toHSL();return e.a-=c.value/100,e.a=d(e.a),b(e)},fade:function(a,c){var e=a.toHSL();return e.a=c.value/100,e.a=d(e.a),b(e)},spin:function(a,c){var d=a.toHSL(),e=(d.h+c.value)%360;return d.h=e<0?360+e:e,b(d)},mix:function(b,c,d){var e=d.value/100,f=e*2-1,g=b.toHSL().a-c.toHSL().a,h=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,i=1-h,j=[b.rgb[0]*h+c.rgb[0]*i,b.rgb[1]*h+c.rgb[1]*i,b.rgb[2]*h+c.rgb[2]*i],k=b.alpha*e+c.alpha*(1-e);return new a.Color(j,k)},greyscale:function(b){return this.desaturate(b,new a.Dimension(100))},e:function(b){return new a.Anonymous(b instanceof a.JavaScript?b.evaluated:b)},escape:function(b){return new a.Anonymous(encodeURI(b.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},"%":function(b){var c=Array.prototype.slice.call(arguments,1),d=b.value;for(var e=0;e255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")},operate:function(b,c){var d=[];c instanceof a.Color||(c=c.toColor());for(var e=0;e<3;e++)d[e]=a.operate(b,this.rgb[e],c.rgb[e]);return new a.Color(d,this.alpha+c.alpha)},toHSL:function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255,d=this.alpha,e=Math.max(a,b,c),f=Math.min(a,b,c),g,h,i=(e+f)/2,j=e-f;if(e===f)g=h=0;else{h=i>.5?j/(2-e-f):j/(e+f);switch(e){case a:g=(b-c)/j+(b255?255:a<0?0:a).toString(16),a.length===1?"0"+a:a}).join("")}}}(c("../tree")),function(a){a.Comment=function(a,b){this.value=a,this.silent=!!b},a.Comment.prototype={toCSS:function(a){return a.compress?"":this.value},eval:function(){return this}}}(c("../tree")),function(a){a.Dimension=function(a,b){this.value=parseFloat(a),this.unit=b||null},a.Dimension.prototype={eval:function(){return this},toColor:function(){return new a.Color([this.value,this.value,this.value])},toCSS:function(){var a=this.value+this.unit;return a},operate:function(b,c){return new a.Dimension(a.operate(b,this.value,c.value),this.unit||c.unit)}}}(c("../tree")),function(a){a.Directive=function(b,c){this.name=b,Array.isArray(c)?this.ruleset=new a.Ruleset([],c):this.value=c},a.Directive.prototype={toCSS:function(a,b){return this.ruleset?(this.ruleset.root=!0,this.name+(b.compress?"{":" {\n ")+this.ruleset.toCSS(a,b).trim().replace(/\n/g,"\n ")+(b.compress?"}":"\n}\n")):this.name+" "+this.value.toCSS()+";\n"},eval:function(a){return a.frames.unshift(this),this.ruleset=this.ruleset&&this.ruleset.eval(a),a.frames.shift(),this},variable:function(b){return a.Ruleset.prototype.variable.call(this.ruleset,b)},find:function(){return a.Ruleset.prototype.find.apply(this.ruleset,arguments)},rulesets:function(){return a.Ruleset.prototype.rulesets.apply(this.ruleset)}}}(c("../tree")),function(a){a.Element=function(b,c,d){this.combinator=b instanceof a.Combinator?b:new a.Combinator(b),this.value=c?c.trim():"",this.index=d},a.Element.prototype.toCSS=function(a){return this.combinator.toCSS(a||{})+this.value},a.Combinator=function(a){a===" "?this.value=" ":a==="& "?this.value="& ":this.value=a?a.trim():""},a.Combinator.prototype.toCSS=function(a){return{"":""," ":" ","&":"","& ":" ",":":" :","::":"::","+":a.compress?"+":" + ","~":a.compress?"~":" ~ ",">":a.compress?">":" > "}[this.value]}}(c("../tree")),function(a){a.Expression=function(a){this.value=a},a.Expression.prototype={eval:function(b){return this.value.length>1?new a.Expression(this.value.map(function(a){return a.eval(b)})):this.value.length===1?this.value[0].eval(b):this},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(" ")}}}(c("../tree")),function(a){a.Import=function(b,c){var d=this;this._path=b,b instanceof a.Quoted?this.path=/\.(le?|c)ss(\?.*)?$/.test(b.value)?b.value:b.value+".less":this.path=b.value.value||b.value,this.css=/css(\?.*)?$/.test(this.path),this.css||c.push(this.path,function(a){if(!a)throw new Error("Error parsing "+d.path);d.root=a})},a.Import.prototype={toCSS:function(){return this.css?"@import "+this._path.toCSS()+";\n":""},eval:function(b){var c;if(this.css)return this;c=new a.Ruleset(null,this.root.rules.slice(0));for(var d=0;d0){c=this.arguments&&this.arguments.map(function(b){return b.eval(a)});for(var g=0;g0&&c>this.params.length)return!1;d=Math.min(c,this.arity);for(var e=0;ee.selectors[g].elements.length?Array.prototype.push.apply(d,e.find(new a.Selector(b.elements.slice(1)),c)):d.push(e);break}}),this._lookups[g]=d)},toCSS:function(b,c){var d=[],e=[],f=[],g=[],h,i;this.root||(b.length===0?g=this.selectors.map(function(a){return[a]}):this.joinSelectors(g,b,this.selectors));for(var j=0;j0&&(h=g.map(function(a){return a.map(function(a){return a.toCSS(c)}).join("").trim()}).join(c.compress?",":g.length>3?",\n":", "),d.push(h,(c.compress?"{":" {\n ")+e.join(c.compress?"":"\n ")+(c.compress?"}":"\n}\n"))),d.push(f),d.join("")+(c.compress?"\n":"")},joinSelectors:function(a,b,c){for(var d=0;d0&&e.push(new a.Selector(g)),h.length>0&&f.push(new a.Selector(h));for(var l=0;l0&&typeof a!="undefined"&&(b.value=c[0]+(b.value.charAt(0)==="/"?b.value.slice(1):b.value)),this.value=b,this.paths=c)},b.URL.prototype={toCSS:function(){return"url("+(this.attrs?"data:"+this.attrs.mime+this.attrs.charset+this.attrs.base64+this.attrs.data:this.value.toCSS())+")"},eval:function(a){return this.attrs?this:new b.URL(this.value.eval(a),this.paths)}}}(c("../tree")),function(a){a.Value=function(a){this.value=a,this.is="value"},a.Value.prototype={eval:function(b){return this.value.length===1?this.value[0].eval(b):new a.Value(this.value.map(function(a){return a.eval(b)}))},toCSS:function(a){return this.value.map(function(b){return b.toCSS(a)}).join(a.compress?",":", ")}}}(c("../tree")),function(a){a.Variable=function(a,b){this.name=a,this.index=b},a.Variable.prototype={eval:function(b){var c,d,e=this.name;e.indexOf("@@")==0&&(e="@"+(new a.Variable(e.slice(1))).eval(b).value);if(c=a.find(b.frames,function(a){if(d=a.variable(e))return d.value.eval(b)}))return c;throw{message:"variable "+e+" is undefined",index:this.index}}}}(c("../tree")),c("./tree").find=function(a,b){for(var c=0,d;c1?"["+a.value.map(function(a){return a.toCSS(!1)}).join(", ")+"]":a.toCSS(!1)};var f=location.protocol==="file:"||location.protocol==="chrome:"||location.protocol==="chrome-extension:"||location.protocol==="resource:";d.env=d.env||(location.hostname=="127.0.0.1"||location.hostname=="0.0.0.0"||location.hostname=="localhost"||location.port.length>0||f?"development":"production"),d.async=!1,d.poll=d.poll||(f?1e3:1500),d.watch=function(){return this.watchMode=!0},d.unwatch=function(){return this.watchMode=!1},d.env==="development"?(d.optimization=0,/!watch/.test(location.hash)&&d.watch(),d.watchTimer=setInterval(function(){d.watchMode&&m(function(a,b,c){a&&p(a.toCSS(),b,c.lastModified)})},d.poll)):d.optimization=3;var g;try{g=typeof a.localStorage=="undefined"?null:a.localStorage}catch(h){g=null}var i=document.getElementsByTagName("link"),j=/^text\/(x-)?less$/;d.sheets=[];for(var k=0;k');
+ line.attr('id', 'settings_'+id+'_line'+next.val());
+ line.append($(' '));
+ line.append(' ');
+ var button = $('- ');
+ button.click(function() {
+ rc.settings.remove_stringlist_field(id, next_value);
+ });
+ line.append(button);
+
+ // Add the new item
+ container.append(line);
+
+ // Increment the next counter
+ next.val(parseInt(next_value)+1);
+ },
+
+ /**
+ * Removes a field from a string list setting
+ *
+ * For array(string) setting types, removes the UI for an element in the array
+ *
+ * @param id DOM ID of the setting to be modified
+ * @param line Number of the line to be removed
+ */
+ remove_stringlist_field: function(id, line) {
+ $("#settings_"+id+"_line"+line).remove();
+ },
+
+ /**
+ * Add a new Hash setting key
+ *
+ * For hash setting types, adds UI for a new key
+ *
+ * @param id DOM ID of the setting to be modified
+ */
+ add_hash_field: function(id) {
+ var container = $('#container_'+id);
+ var next = $('#settings_'+id+'_next');
+ var next_value = next.val();
+
+ var line = $('');
+ line.attr('id', 'settings_'+id+'_line'+next.val());
+
+ var hash_key = $('
');
+ var hash_value = $('
');
+ hash_key.change(function() {
+ $('#setting_'+id+'_value'+next_value).attr('name', id+'['+$(this).val()+']');
+ });
+
+ line.append(hash_key).append(' ').append(hash_value).append(' ');
+ var button = $('
- ');
+ button.click(function() {
+ rc.settings.remove_hash_field(id, next_value);
+ });
+ line.append(button);
+
+ // Add the new item
+ container.append(line);
+
+ // Increment the next counter
+ next.val(parseInt(next_value)+1);
+ },
+
+ /**
+ * Removes a hash setting key
+ *
+ * For hash setting types, removes the UI for a specific key
+ *
+ * @param id DOM ID of the setting to be modified
+ * @param line Line number of the hash key to be removed
+ */
+ remove_hash_field: function(id, line) {
+ $("#settings_"+id+"_line"+line).remove();
+ },
+
+ /**
+ * Saves the current setting values to the database
+ *
+ */
+ save: function() {
+
+ var settings = {};
+
+ var fields = $("input.setting").get();
+ for (var i in fields) {
+ var setting = fields[i];
+ var name = setting.name;
+ var value;
+
+ switch(setting.type) {
+ case 'checkbox':
+ value = $(setting).is(':checked') ? 1 : 0;
+ break;
+ default:
+ value = setting.value;
+ }
+
+ if (/\[\]$/.test(name)) {
+ if (! settings[name]) {
+ settings[name] = [];
+ }
+ settings[name].push(value);
+ } else {
+ settings[name] = value;
+ }
+ }
+
+ sf.ajax.post(base_url + "ajax/update-settings/", settings);
+
+ }
+
+ }
+
+};
+
+$(document).ready(rc.init);
diff --git a/public/scripts/sihnon-js-lib b/public/scripts/sihnon-js-lib
new file mode 120000
index 0000000..04f5258
--- /dev/null
+++ b/public/scripts/sihnon-js-lib
@@ -0,0 +1 @@
+../../externals/sihnon-js-lib/public
\ No newline at end of file
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_222222_256x240.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_222222_256x240.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_222222_256x240.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_222222_256x240.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_2e83ff_256x240.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_454545_256x240.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_454545_256x240.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_454545_256x240.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_454545_256x240.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_888888_256x240.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_888888_256x240.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_888888_256x240.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_888888_256x240.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png b/public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png
rename to public/styles/3rdparty/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png
diff --git a/webui/styles/3rdparty/jquery-ui/smoothness/jquery-ui-1.8.custom.css b/public/styles/3rdparty/jquery-ui/smoothness/jquery-ui-1.8.custom.css
similarity index 100%
rename from webui/styles/3rdparty/jquery-ui/smoothness/jquery-ui-1.8.custom.css
rename to public/styles/3rdparty/jquery-ui/smoothness/jquery-ui-1.8.custom.css
diff --git a/webui/styles/3rdparty/jquery.asmselect.css b/public/styles/3rdparty/jquery.asmselect.css
similarity index 100%
rename from webui/styles/3rdparty/jquery.asmselect.css
rename to public/styles/3rdparty/jquery.asmselect.css
diff --git a/public/styles/normal.css b/public/styles/normal.css
new file mode 100644
index 0000000..ddf2894
--- /dev/null
+++ b/public/styles/normal.css
@@ -0,0 +1,76 @@
+/**
+ * StatusBoard normal stylesheet
+ *
+ */
+@import url('http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css');
+@CHARSET "UTF-8";
+
+@media all {
+ body {
+ margin: 0em;
+ margin-top: 60px;
+ padding-top: 40px;
+ padding: 0em;
+ font-family: verdana, helvetica, sans-serif;
+/* background: #F7F7F7;*/
+ }
+
+ a {
+ color: gray;
+ }
+
+ label {
+ margin-left: 1em;
+ margin-right: 1em;
+ }
+
+ footer {
+ padding: 2em;
+ font-size: smaller;
+ font-style: italic;
+ color: #333333;
+ text-align: center;
+ }
+
+ .dialog-footer-buttonset {
+ display: none;
+ }
+
+ .dialog-footer-buttonset fieldset {
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-bottom: 0;
+ }
+
+ .default {
+ background: beige;
+ color: darkgray;
+ font-style: italic;
+ }
+
+ .icon {
+ height: 16px;
+ width: 16px;
+ }
+
+ #quantizer-slider {
+ width: 10em;
+ margin: 0.5em;
+ }
+
+ .highlight {
+ background: #dceaf4;
+ }
+}
+
+@media print {
+
+ .no-print {
+ display: none;
+ }
+
+ body {
+ margin: 0;
+ }
+
+}
\ No newline at end of file
diff --git a/source/lib/RippingCluster/Job.class.php b/source/lib/RippingCluster/Job.class.php
index 7787a76..55b94ba 100644
--- a/source/lib/RippingCluster/Job.class.php
+++ b/source/lib/RippingCluster/Job.class.php
@@ -353,6 +353,10 @@ class RippingCluster_Job {
public function destinationFilename() {
return $this->destination_filename;
}
+
+ public function destinationFileBasename() {
+ return basename($this->destination_filename);
+ }
public function title() {
return $this->title;
@@ -364,7 +368,7 @@ class RippingCluster_Job {
$env['RIPPING_CLUSTER_CONFIG'] = $_SERVER['RIPPING_CLUSTER_CONFIG'];
}
- RippingCluster_BackgroundTask::run('/usr/bin/php ' . RippingCluster_Main::makeAbsolutePath('run-jobs.php'), null, $env);
+ RippingCluster_BackgroundTask::run('/usr/bin/php ' . RippingCluster_Main::makeAbsolutePath('../source/webui/run-jobs.php'), null, $env);
}
};
diff --git a/source/lib/RippingCluster/JobStatus.class.php b/source/lib/RippingCluster/JobStatus.class.php
index eab70cc..d1500d7 100644
--- a/source/lib/RippingCluster/JobStatus.class.php
+++ b/source/lib/RippingCluster/JobStatus.class.php
@@ -61,7 +61,7 @@ class RippingCluster_JobStatus {
$statuses = array();
$database = RippingCluster_Main::instance()->database();
- foreach ($database->selectList('SELECT * FROM job_status WHERE job_id=:job_id ORDER BY mtime ASC', array(
+ foreach ($database->selectList('SELECT * FROM job_status WHERE job_id=:job_id ORDER BY id ASC', array(
array('name' => 'job_id', 'value' => $job->id(), 'type' => PDO::PARAM_INT),
)) as $row) {
$statuses[] = RippingCluster_JobStatus::fromDatabaseRow($row);
diff --git a/source/lib/RippingCluster/Main.class.php b/source/lib/RippingCluster/Main.class.php
index 18f8599..9dc1ba4 100644
--- a/source/lib/RippingCluster/Main.class.php
+++ b/source/lib/RippingCluster/Main.class.php
@@ -4,6 +4,9 @@ require 'smarty/Smarty.class.php';
class RippingCluster_Main extends SihnonFramework_Main {
+ const TEMPLATE_DIR = '../source/webui/templates/';
+ const CODE_DIR = '../source/webui/pages/';
+
protected static $instance;
protected $smarty;
@@ -11,21 +14,25 @@ class RippingCluster_Main extends SihnonFramework_Main {
protected function __construct() {
parent::__construct();
+ }
+ protected function init() {
+ parent::init();
+
$request_string = isset($_GET['l']) ? $_GET['l'] : '';
- $this->request = new RippingCluster_RequestParser($request_string);
-
+ $this->request = new RippingCluster_RequestParser($request_string, self::TEMPLATE_DIR, self::CODE_DIR);
+
switch (HBC_File) {
case 'ajax':
case 'index': {
- $smarty_tmp = '/var/tmp/ripping-cluster';
+ $smarty_tmp = $this->config->get('templates.tmp_path', '/var/tmp/ripping-cluster');
$this->smarty = new Smarty();
- $this->smarty->template_dir = static::makeAbsolutePath('./source/templates');
- $this->smarty->compile_dir = static::makeAbsolutePath($smarty_tmp . '/templates');
+ $this->smarty->template_dir = static::makeAbsolutePath(self::TEMPLATE_DIR);
+ $this->smarty->compile_dir = static::makeAbsolutePath($smarty_tmp . '/templates');
$this->smarty->cache_dir = static::makeAbsolutePath($smarty_tmp . '/cache');
$this->smarty->config_dir = static::makeAbsolutePath($smarty_tmp . '/config');
- $this->smarty->plugins_dir[]= static::makeAbsolutePath('./source/smarty/plugins');
+ $this->smarty->plugins_dir[]= static::makeAbsolutePath('../source/webui/smarty/plugins');
$this->smarty->registerPlugin('modifier', 'formatDuration', array('RippingCluster_Main', 'formatDuration'));
$this->smarty->registerPlugin('modifier', 'formatFilesize', array('RippingCluster_Main', 'formatFilesize'));
@@ -35,7 +42,8 @@ class RippingCluster_Main extends SihnonFramework_Main {
$this->smarty->assign('base_uri', $this->base_uri);
$this->smarty->assign('base_url', static::absoluteUrl(''));
-
+ $this->smarty->assign('title', 'Ripping Cluster WebUI');
+
} break;
}
diff --git a/webui/source/pages/admin/settings.php b/source/webui/pages/admin/settings.php
similarity index 100%
rename from webui/source/pages/admin/settings.php
rename to source/webui/pages/admin/settings.php
diff --git a/webui/source/pages/ajax/admin/add-setting.php b/source/webui/pages/ajax/admin/add-setting.php
similarity index 97%
rename from webui/source/pages/ajax/admin/add-setting.php
rename to source/webui/pages/ajax/admin/add-setting.php
index 1cc591c..9e50b10 100644
--- a/webui/source/pages/ajax/admin/add-setting.php
+++ b/source/webui/pages/ajax/admin/add-setting.php
@@ -32,7 +32,7 @@ try {
} break;
case 'hash': {
$type = Sihnon_Config::TYPE_HASH;
- $value = array();
+ $value = array('' => '');
} break;
}
diff --git a/webui/source/pages/ajax/admin/remove-setting.php b/source/webui/pages/ajax/admin/remove-setting.php
similarity index 100%
rename from webui/source/pages/ajax/admin/remove-setting.php
rename to source/webui/pages/ajax/admin/remove-setting.php
diff --git a/webui/source/pages/ajax/admin/rename-setting.php b/source/webui/pages/ajax/admin/rename-setting.php
similarity index 100%
rename from webui/source/pages/ajax/admin/rename-setting.php
rename to source/webui/pages/ajax/admin/rename-setting.php
diff --git a/webui/source/pages/ajax/delete-source.php b/source/webui/pages/ajax/delete-source.php
similarity index 100%
rename from webui/source/pages/ajax/delete-source.php
rename to source/webui/pages/ajax/delete-source.php
diff --git a/webui/source/pages/ajax/source-list.php b/source/webui/pages/ajax/source-list.php
similarity index 100%
rename from webui/source/pages/ajax/source-list.php
rename to source/webui/pages/ajax/source-list.php
diff --git a/webui/source/pages/ajax/update-settings.php b/source/webui/pages/ajax/update-settings.php
similarity index 100%
rename from webui/source/pages/ajax/update-settings.php
rename to source/webui/pages/ajax/update-settings.php
diff --git a/webui/source/pages/errors/404.php b/source/webui/pages/errors/404.php
similarity index 100%
rename from webui/source/pages/errors/404.php
rename to source/webui/pages/errors/404.php
diff --git a/webui/source/pages/errors/unhandled-exception.php b/source/webui/pages/errors/unhandled-exception.php
similarity index 100%
rename from webui/source/pages/errors/unhandled-exception.php
rename to source/webui/pages/errors/unhandled-exception.php
diff --git a/webui/source/pages/home.php b/source/webui/pages/home.php
similarity index 100%
rename from webui/source/pages/home.php
rename to source/webui/pages/home.php
diff --git a/webui/source/pages/jobs.php b/source/webui/pages/jobs.php
similarity index 100%
rename from webui/source/pages/jobs.php
rename to source/webui/pages/jobs.php
diff --git a/webui/source/pages/jobs/details.php b/source/webui/pages/jobs/details.php
similarity index 100%
rename from webui/source/pages/jobs/details.php
rename to source/webui/pages/jobs/details.php
diff --git a/webui/source/pages/logs.php b/source/webui/pages/logs.php
similarity index 100%
rename from webui/source/pages/logs.php
rename to source/webui/pages/logs.php
diff --git a/webui/source/pages/rips/setup.php b/source/webui/pages/rips/setup.php
similarity index 79%
rename from webui/source/pages/rips/setup.php
rename to source/webui/pages/rips/setup.php
index 0c11acb..99a4058 100644
--- a/webui/source/pages/rips/setup.php
+++ b/source/webui/pages/rips/setup.php
@@ -11,7 +11,14 @@ if ($req->exists('submit')) {
// Update the recently used list
$recent_output_directories = $config->get('rips.output_directories.recent');
- if ( ! in_array($_POST['rip-options']['output-directory'], $recent_output_directories)) {
+ if (( $key = array_search($_POST['rip-options']['output-directory'], $recent_output_directories, true)) >= 0) {
+ // Move the entry to the top of the recently used list if necessary
+ $recent_directory = array_splice($recent_output_directories, $key, 1);
+ if ($key > 0) {
+ array_unshift($recent_output_directories, $recent_directory[0]);
+ $config->set('rips.output_directories.recent', array_slice($recent_output_directories, 0, $config->get('rips.output_directories.recent_limit', 10)));
+ }
+ } else {
array_unshift($recent_output_directories, $_POST['rip-options']['output-directory']);
$config->set('rips.output_directories.recent', array_slice($recent_output_directories, 0, $config->get('rips.output_directories.recent_limit', 10)));
}
diff --git a/webui/source/pages/sources/details.php b/source/webui/pages/sources/details.php
similarity index 100%
rename from webui/source/pages/sources/details.php
rename to source/webui/pages/sources/details.php
diff --git a/webui/source/pages/sources/list.php b/source/webui/pages/sources/list.php
similarity index 100%
rename from webui/source/pages/sources/list.php
rename to source/webui/pages/sources/list.php
diff --git a/webui/run-jobs.php b/source/webui/run-jobs.php
similarity index 100%
rename from webui/run-jobs.php
rename to source/webui/run-jobs.php
diff --git a/webui/source/smarty/plugins/compiler.switch.php b/source/webui/smarty/plugins/compiler.switch.php
similarity index 100%
rename from webui/source/smarty/plugins/compiler.switch.php
rename to source/webui/smarty/plugins/compiler.switch.php
diff --git a/webui/source/templates/admin/settings.tpl b/source/webui/templates/admin/settings.tpl
similarity index 69%
rename from webui/source/templates/admin/settings.tpl
rename to source/webui/templates/admin/settings.tpl
index 3640b03..05f3ebe 100644
--- a/webui/source/templates/admin/settings.tpl
+++ b/source/webui/templates/admin/settings.tpl
@@ -17,13 +17,9 @@
-
-
+ Save
+ New Setting
-
-
\ No newline at end of file
diff --git a/webui/source/templates/ajax.tpl b/source/webui/templates/ajax.tpl
similarity index 100%
rename from webui/source/templates/ajax.tpl
rename to source/webui/templates/ajax.tpl
diff --git a/webui/source/templates/ajax/admin/add-setting.tpl b/source/webui/templates/ajax/admin/add-setting.tpl
similarity index 100%
rename from webui/source/templates/ajax/admin/add-setting.tpl
rename to source/webui/templates/ajax/admin/add-setting.tpl
diff --git a/webui/source/templates/ajax/admin/new-setting.tpl b/source/webui/templates/ajax/admin/new-setting.tpl
similarity index 92%
rename from webui/source/templates/ajax/admin/new-setting.tpl
rename to source/webui/templates/ajax/admin/new-setting.tpl
index 743a360..fa25298 100644
--- a/webui/source/templates/ajax/admin/new-setting.tpl
+++ b/source/webui/templates/ajax/admin/new-setting.tpl
@@ -1,10 +1,10 @@
"page_replacements": {
- "dialogheadertitle": {
+ "dialog-header-title": {
"content": "Add Setting"
},
- "dialogcontent": {
+ "dialog-body": {
{include file="fragments/new-setting-dialog.tpl" assign=new_setting_dialog_content}
"content": {$new_setting_dialog_content|json_encode}
}
diff --git a/webui/source/templates/ajax/admin/remove-setting.tpl b/source/webui/templates/ajax/admin/remove-setting.tpl
similarity index 100%
rename from webui/source/templates/ajax/admin/remove-setting.tpl
rename to source/webui/templates/ajax/admin/remove-setting.tpl
diff --git a/webui/source/templates/ajax/admin/rename-setting.tpl b/source/webui/templates/ajax/admin/rename-setting.tpl
similarity index 95%
rename from webui/source/templates/ajax/admin/rename-setting.tpl
rename to source/webui/templates/ajax/admin/rename-setting.tpl
index eb744c9..2c73a70 100644
--- a/webui/source/templates/ajax/admin/rename-setting.tpl
+++ b/source/webui/templates/ajax/admin/rename-setting.tpl
@@ -14,11 +14,11 @@
"success": {$success|json_encode}
{else}
"page_replacements": {
- "dialogheadertitle": {
+ "dialog-header-title": {
"content": "Rename Setting"
},
- "dialogcontent": {
+ "dialog-body": {
{include file="fragments/rename-setting-dialog.tpl" assign="content"}
"content": {$content|json_encode}
}
diff --git a/webui/source/templates/ajax/delete-source.tpl b/source/webui/templates/ajax/delete-source.tpl
similarity index 88%
rename from webui/source/templates/ajax/delete-source.tpl
rename to source/webui/templates/ajax/delete-source.tpl
index 179d78d..e71ba75 100644
--- a/webui/source/templates/ajax/delete-source.tpl
+++ b/source/webui/templates/ajax/delete-source.tpl
@@ -6,11 +6,11 @@
"content": {$sources_html|json_encode}
}
{else}
- "dialogheadertitle": {
- "content": "Delete Source"
+ "dialog-header-title": {
+ "content": "Delete this source?"
},
- "dialogcontent": {
+ "dialog-body": {
{include file="fragments/delete-source.tpl" assign="delete_source_html"}
"content": {$delete_source_html|json_encode}
}
diff --git a/webui/source/templates/ajax/source-list.tpl b/source/webui/templates/ajax/source-list.tpl
similarity index 100%
rename from webui/source/templates/ajax/source-list.tpl
rename to source/webui/templates/ajax/source-list.tpl
diff --git a/webui/source/templates/ajax/update-settings.tpl b/source/webui/templates/ajax/update-settings.tpl
similarity index 78%
rename from webui/source/templates/ajax/update-settings.tpl
rename to source/webui/templates/ajax/update-settings.tpl
index 3fa938f..6c5bf6d 100644
--- a/webui/source/templates/ajax/update-settings.tpl
+++ b/source/webui/templates/ajax/update-settings.tpl
@@ -1,10 +1,10 @@
"page_replacements": {
- "dialogheadertitle": {
- "content": "Update Settings"
+ "dialog-header-title": {
+ "content": "Settings updated"
},
- "dialogcontent": {
+ "dialog-body": {
{include file="fragments/update-settings-dialog.tpl" assign=dialog_content}
"content": {$dialog_content|json_encode}
}
diff --git a/webui/source/templates/errors/404.tpl b/source/webui/templates/errors/404.tpl
similarity index 100%
rename from webui/source/templates/errors/404.tpl
rename to source/webui/templates/errors/404.tpl
diff --git a/webui/source/templates/errors/unhandled-exception.tpl b/source/webui/templates/errors/unhandled-exception.tpl
similarity index 100%
rename from webui/source/templates/errors/unhandled-exception.tpl
rename to source/webui/templates/errors/unhandled-exception.tpl
diff --git a/source/webui/templates/fragments/admin-setting-row.tpl b/source/webui/templates/fragments/admin-setting-row.tpl
new file mode 100644
index 0000000..3329db5
--- /dev/null
+++ b/source/webui/templates/fragments/admin-setting-row.tpl
@@ -0,0 +1,14 @@
+
+
+
+ {$name}
+
+
+ Rename
+ Remove
+
+
+
+ {include file="fragments/admin-setting-value.tpl"}
+
+
\ No newline at end of file
diff --git a/webui/source/templates/fragments/admin-setting-value.tpl b/source/webui/templates/fragments/admin-setting-value.tpl
similarity index 50%
rename from webui/source/templates/fragments/admin-setting-value.tpl
rename to source/webui/templates/fragments/admin-setting-value.tpl
index 16a3dc1..409d9a5 100644
--- a/webui/source/templates/fragments/admin-setting-value.tpl
+++ b/source/webui/templates/fragments/admin-setting-value.tpl
@@ -3,38 +3,40 @@
{/case}
{case Sihnon_Config::TYPE_INT}
-
+
{/case}
{case Sihnon_Config::TYPE_STRING}
-
+
{/case}
{case Sihnon_Config::TYPE_STRING_LIST}
-
+ +
{/case}
{case Sihnon_Config::TYPE_HASH}
-
+ +
{/case}
diff --git a/webui/source/templates/fragments/delete-source.tpl b/source/webui/templates/fragments/delete-source.tpl
similarity index 100%
rename from webui/source/templates/fragments/delete-source.tpl
rename to source/webui/templates/fragments/delete-source.tpl
diff --git a/source/webui/templates/fragments/job-filename-popover.tpl b/source/webui/templates/fragments/job-filename-popover.tpl
new file mode 100644
index 0000000..abd64f1
--- /dev/null
+++ b/source/webui/templates/fragments/job-filename-popover.tpl
@@ -0,0 +1,9 @@
+
+ Destination Filename
+ {$job->destinationFilename()|escape:html}
+
+ {if $job->isFinished()}
+ File size
+ ({$job->outputFilesize()|formatFilesize|escape:html})
+ {/if}
+
\ No newline at end of file
diff --git a/source/webui/templates/fragments/job-status-popover.tpl b/source/webui/templates/fragments/job-status-popover.tpl
new file mode 100644
index 0000000..0530071
--- /dev/null
+++ b/source/webui/templates/fragments/job-status-popover.tpl
@@ -0,0 +1,15 @@
+
+ {if $current_status->hasProgressInfo()}
+ Started
+ {$current_status->ctime()|date_format:"%D %T"}
+
+ Progress
+ {$current_status->ripProgress()}%
+
+ ETA
+ {$job->calculateETA()|formatDuration}
+ {/if}
+
+ Last update
+ {$current_status->mtime()|date_format:"%D %T"}
+
diff --git a/webui/source/templates/fragments/messages.tpl b/source/webui/templates/fragments/messages.tpl
similarity index 100%
rename from webui/source/templates/fragments/messages.tpl
rename to source/webui/templates/fragments/messages.tpl
diff --git a/source/webui/templates/fragments/new-setting-dialog.tpl b/source/webui/templates/fragments/new-setting-dialog.tpl
new file mode 100644
index 0000000..82772a4
--- /dev/null
+++ b/source/webui/templates/fragments/new-setting-dialog.tpl
@@ -0,0 +1,11 @@
+
Name
+
+
+
Type
+
+ Integer
+ Boolean
+ String
+ String List
+ Hash
+
diff --git a/webui/source/templates/fragments/rename-setting-dialog.tpl b/source/webui/templates/fragments/rename-setting-dialog.tpl
similarity index 52%
rename from webui/source/templates/fragments/rename-setting-dialog.tpl
rename to source/webui/templates/fragments/rename-setting-dialog.tpl
index ed32c6d..f7b5859 100644
--- a/webui/source/templates/fragments/rename-setting-dialog.tpl
+++ b/source/webui/templates/fragments/rename-setting-dialog.tpl
@@ -2,5 +2,5 @@
Enter a new name for setting '{$name|escape}' below.
-
+
\ No newline at end of file
diff --git a/webui/source/templates/fragments/source-list.tpl b/source/webui/templates/fragments/source-list.tpl
similarity index 96%
rename from webui/source/templates/fragments/source-list.tpl
rename to source/webui/templates/fragments/source-list.tpl
index 69491e1..1f62c3f 100644
--- a/webui/source/templates/fragments/source-list.tpl
+++ b/source/webui/templates/fragments/source-list.tpl
@@ -7,7 +7,7 @@
{assign var='source_filename' value=$source->filename()}
{assign var='source_filename_encoded' value=$source->filenameEncoded()}
{assign var='source_cached' value=$source->isCached()}
-
+
[ Browse |
Rip |
Delete ]
diff --git a/webui/source/templates/fragments/update-settings-dialog.tpl b/source/webui/templates/fragments/update-settings-dialog.tpl
similarity index 82%
rename from webui/source/templates/fragments/update-settings-dialog.tpl
rename to source/webui/templates/fragments/update-settings-dialog.tpl
index d0c2214..463d169 100644
--- a/webui/source/templates/fragments/update-settings-dialog.tpl
+++ b/source/webui/templates/fragments/update-settings-dialog.tpl
@@ -1,5 +1,5 @@
- Settings have been saved.
+ Your changes have been saved.
{if $messages}
diff --git a/webui/source/templates/home.tpl b/source/webui/templates/home.tpl
similarity index 62%
rename from webui/source/templates/home.tpl
rename to source/webui/templates/home.tpl
index cf84775..235b03b 100644
--- a/webui/source/templates/home.tpl
+++ b/source/webui/templates/home.tpl
@@ -6,24 +6,6 @@
{foreach from=$running_jobs item=job}
{$job->name()} {$job->currentStatus()->ripProgress()}% ({RippingCluster_Main::formatDuration($job->calculateETA(), 1)} remaining)
{/foreach}
-
{else}
There are no currently running jobs.
{/if}
diff --git a/source/webui/templates/index.tpl b/source/webui/templates/index.tpl
new file mode 100644
index 0000000..5e73423
--- /dev/null
+++ b/source/webui/templates/index.tpl
@@ -0,0 +1,131 @@
+
+
+
+ {$title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$page->include_template('navigation')}
+
+
+
+
+
+
+
+
RippingCluster WebUI
+
+
+
+
+ {if ! $messages}
+ {$session = RippingCluster_Main::instance()->session()}
+ {$messages = $session->get('messages')}
+ {$session->delete('messages')}
+ {/if}
+ {if $messages}
+
+ {foreach from=$messages item=message}
+ {if is_array($message)}
+ {$severity=$message['severity']}
+
+ {$message['content']|escape:html}
+
+ {else}
+
+ {$message|escape:html}
+
+ {/if}
+ {/foreach}
+
+ {/if}
+
+
+ {$page_content}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/webui/source/templates/jobs.tpl b/source/webui/templates/jobs.tpl
similarity index 80%
rename from webui/source/templates/jobs.tpl
rename to source/webui/templates/jobs.tpl
index bf421b3..c24295d 100644
--- a/webui/source/templates/jobs.tpl
+++ b/source/webui/templates/jobs.tpl
@@ -31,44 +31,41 @@
+
+
+ Actions
+
Name
Destination
- Title
Status
- Actions
{foreach from=$jobs item=job}
{assign var=current_status value=$job->currentStatus()}
- {$job->name()}
-
- {$job->destinationFilename()}
- {if $job->isFinished()}
- ({$job->outputFilesize()|formatFilesize})
- {/if}
-
- {$job->title()}
-
- {$current_status->statusName()}
- {if $current_status->hasProgressInfo()}
-
- Started: {$current_status->ctime()|date_format:"%D %T"}
- Progress: {$current_status->ripProgress()}%
- Last update: {$current_status->mtime()|date_format:"%D %T"}
- ETA: {$job->calculateETA()|formatDuration}
- {/if}
-
-
+
+ {$job->name()}
+
+ {include file="fragments/job-filename-popover.tpl" assign=popover_content}
+ {$job->destinationFileBasename()|escape:html}
+
+
+ {include file="fragments/job-status-popover.tpl" assign=popover_content}
+ {$current_status->statusName()}
+ {if $current_status->hasProgressInfo()}
+
+ {$job->calculateETA()|formatDuration:1} remaining
+ {/if}
+
{/foreach}
diff --git a/webui/source/templates/jobs/details.tpl b/source/webui/templates/jobs/details.tpl
similarity index 100%
rename from webui/source/templates/jobs/details.tpl
rename to source/webui/templates/jobs/details.tpl
diff --git a/webui/source/templates/logs.tpl b/source/webui/templates/logs.tpl
similarity index 100%
rename from webui/source/templates/logs.tpl
rename to source/webui/templates/logs.tpl
diff --git a/source/webui/templates/navigation.tpl b/source/webui/templates/navigation.tpl
new file mode 100644
index 0000000..8e3155a
--- /dev/null
+++ b/source/webui/templates/navigation.tpl
@@ -0,0 +1,31 @@
+RippingCluster
+
+
+
diff --git a/webui/source/templates/rips/setup.tpl b/source/webui/templates/rips/setup.tpl
similarity index 77%
rename from webui/source/templates/rips/setup.tpl
rename to source/webui/templates/rips/setup.tpl
index 557cbdc..998eebd 100644
--- a/webui/source/templates/rips/setup.tpl
+++ b/source/webui/templates/rips/setup.tpl
@@ -17,9 +17,9 @@
-
+
Output directory
-
+
{foreach from=$default_output_directories item=dir key=name}
@@ -45,41 +45,45 @@
-
+
Output format
-
+
MKV
-
+
Video codec
-
+
x264
-
+
Video width
-
- (Use 0 to leave size unchanged from source.)
-
-
-
+
+
Video height
+
+
+ (Use 0 to leave size unchanged from source.)
+
+
+
+
Quantizer
-
-
(Defaults to 0.61, x264's quantizer value for 20)
-
+
-
-
-
@@ -89,17 +93,17 @@
Configure title rip options
-
+
Rip this title
-
+
Short Name
-
+
Audio tracks
{foreach from=$title->audioTracks() item=audio}
@@ -107,22 +111,7 @@
{/foreach}
-
- Selected audio tracks
-
-
- Track
- Encoder
- Name
-
-
-
-
-
-
-
-
-
+
Subtitle tracks
{foreach from=$title->subtitleTracks() item=subtitle}
@@ -130,27 +119,12 @@
{/foreach}
-
- Selected subtitle tracks
-
-
- Track
- Language
- Format
-
-
-
-
-
-
-
-
-
+
Output filename
-
+
Deinterlacing
None
diff --git a/webui/source/templates/sidebar.tpl b/source/webui/templates/sidebar.tpl
similarity index 100%
rename from webui/source/templates/sidebar.tpl
rename to source/webui/templates/sidebar.tpl
diff --git a/webui/source/templates/sources/details.tpl b/source/webui/templates/sources/details.tpl
similarity index 100%
rename from webui/source/templates/sources/details.tpl
rename to source/webui/templates/sources/details.tpl
diff --git a/webui/source/templates/sources/list.tpl b/source/webui/templates/sources/list.tpl
similarity index 100%
rename from webui/source/templates/sources/list.tpl
rename to source/webui/templates/sources/list.tpl
diff --git a/worker/ripping-cluster-worker.php b/source/worker/ripping-cluster-worker.php
similarity index 100%
rename from worker/ripping-cluster-worker.php
rename to source/worker/ripping-cluster-worker.php
diff --git a/webui/scripts/main.js b/webui/scripts/main.js
deleted file mode 100644
index a3296cf..0000000
--- a/webui/scripts/main.js
+++ /dev/null
@@ -1,370 +0,0 @@
-var rc = {
-
- init: function() {
- rc.ajax.init();
- rc.dialog.init();
- rc.page.init();
- },
-
- ajax: {
-
- init: function() {
-
- },
-
- get: function(url) {
- $.ajax({
- url: url,
- type: "GET",
- dataType: "json",
- success: rc.ajax.success,
- error: rc.ajax.failure
- });
- },
-
- post: function(url, data) {
- $.ajax({
- url: url,
- type: "POST",
- dataType: "json",
- data: data,
- success: rc.ajax.success,
- error: rc.ajax.failure
- });
- },
-
- success: function(d, s, x) {
- rc.page.update(d);
- rc.dialog.prepare(d);
- rc.trigger_all(d);
- },
-
- failure: function(x, s, e) {
- console.log("Ajax Failure: " + s, e);
- console.log(x.responseText);
- }
- },
-
- dialog: {
-
- init: function() {
- $("#dialogheaderclose").click(rc.dialog.close);
- },
-
- prepare: function(d) {
- if (d.dialog && d.dialog.show) {
-
- if (d.dialog.buttons) {
- switch (d.dialog.buttons.type) {
- case 'ok':
- $("#dialogfooterok").click(
- function() {
- rc.trigger(d.dialog.buttons.actions.ok, d.dialog.buttons.params);
- }
- );
- $("#dialogfooterok").show();
- break;
- case 'okcancel':
- $("#dialogfooterokcancel_ok").click(function() {
- rc.trigger(d.dialog.buttons.actions.ok, d.dialog.buttons.params);
- });
- $("#dialogfooterokcancel_cancel").click(function() {
- rc.trigger(d.dialog.buttons.actions.cancel, d.dialog.buttons.params);
- });
- $("#dialogfooterokcancel").show();
- break;
- case 'yesno':
- $("#dialogfooteryes").click(
- function() {
- rc.trigger(d.dialog.buttons.actions.yes, d.dialog.buttons.params);
- }
- );
- $("#dialogfooterno").click(
- function() {
- rc.trigger(d.dialog.buttons.actions.no, d.dialog.buttons.params);
- }
- );
- $("#dialogfooteryesno").show();
- break;
- }
- }
-
- if (d.dialog.title) {
- $('#dialogheadertitle').html(d.dialog.title);
- }
-
- if (d.dialog.content) {
- $('#dialogcontent').html(d.dialog.content);
- }
-
- $("#dialog").show();
- }
- },
-
- close: function() {
- // Hide the dialog
- $("#dialog").hide();
-
- // Remove the dialog content
- $("#dialogcontent").html();
-
- // Hide all buttons
- $(".dialogfooterbuttonset").hide();
- // Strip all event handlers
- $(".dialogfooterbuttonset input[type='button']").unbind('click');
- },
-
- error: function(title, content, messages) {
- var formatted_content = $('').append($('
').text('content'));
- if (messages) {
- var formatted_messages = $('
');
- for (var message in messages) {
- formatted_messages.append($('').text(message));
- }
-
- formatted_content.append($('').text('These messages were reported:').append(formatted_messages));
- }
-
- rc.dialog.prepare({
- dialog: {
- show: true,
- title: title,
- content: formatted_content,
- buttons: {
- type: 'ok',
- actions: {
- ok: 'close-dialog'
- }
- }
- }
- });
- }
-
- },
-
- page: {
-
- init: function() {
-
- },
-
- update: function(d) {
- for ( var f in d.page_replacements) {
- $("#" + f).html(d.page_replacements[f].content);
- }
- }
- },
-
- sources: {
-
- remove: function(plugin, source) {
- rc.ajax.get(base_url + "ajax/delete-source/plugin/" + plugin + "/id/" + source);
- },
-
- remove_confirmed: function(plugin, source) {
- rc.ajax.get(base_url + "ajax/delete-source/plugin/" + plugin + "/id/" + source + "/confirm/");
- }
-
- },
-
- actions: {
-
- 'close-dialog': function(params) {
- rc.dialog.close();
- },
-
- 'delete-source-confirm': function(params) {
- rc.sources.remove_confirmed(params['plugin'], params['id']);
- },
-
- 'add-setting': function(params) {
- rc.ajax.post(base_url + 'ajax/admin/add-setting/name/' + $('#'+params.name).val() + '/type/' + $('#'+params.type).val() + '/');
- },
-
- 'add_setting_row': function(params) {
- $("#settings tbody").append(params.content);
- },
-
- 'rename_setting': function(params) {
- rc.ajax.post(base_url + 'ajax/admin/rename-setting/name/' + params.name + '/new-name/' + $('#'+params.new_name_field).val() + '/confirm/');
- },
-
- 'rename_setting_confirm': function(params) {
- $('#setting_'+params.old_id+'_row').replaceWith($(params.content));
- },
-
- 'remove_setting': function(params) {
- rc.ajax.post(base_url + 'ajax/admin/remove-setting/name/' + params.name + '/');
- rc.trigger('remove_setting_row', params);
- },
-
- 'remove_setting_row': function(params) {
- $('#setting_' + params.id + '_row').remove();
- }
-
- },
-
- trigger: function(action, params) {
- // Handle a list of actions by repeated calling self for each argument
- if (action instanceof Array) {
- for(i in action) {
- rc.trigger(action[i], params);
- }
- return;
- }
-
- // Check if action is supported, and execute it
- if (rc.actions[action]) {
- rc.actions[action](params);
- } else {
- console.log("Action not supported: " +action);
- }
- },
-
- trigger_all: function(params) {
- if (params.actions) {
- for (var action in params.actions) {
- rc.trigger(action, params.actions[action]);
- }
- }
- },
-
- settings: {
-
- init: function() {
- $("#settings_save").click(function() {
- rc.settings.save();
- });
-
- $("#settings_new").click(function() {
- rc.settings.new_setting();
- });
- },
-
- new_setting: function() {
- rc.ajax.get(base_url + "ajax/admin/new-setting/");
- },
-
- rename_setting: function(id, name) {
- rc.ajax.get(base_url + "ajax/admin/rename-setting/name/" + name + "/");
- },
-
- remove_setting: function(id, name) {
- rc.dialog.prepare({
- dialog: {
- show: true,
- title: 'Remove setting',
- content: "Do you really want to remove setting '" + name + "'",
- buttons: {
- type: 'okcancel',
- actions: {
- ok: [
- 'remove_setting',
- 'close-dialog'
- ],
- cancel: 'close-dialog'
- },
- params: {
- id: id,
- name: name
- }
- }
- }
- });
- },
-
- add_stringlist_field: function(id) {
- var container = $('#container_'+id);
- var next = $('#settings_'+id+'_next');
- var next_value = next.val();
-
- var line = $('
');
- line.attr('id', 'settings_'+id+'_line'+next.val());
- line.append($('
'));
- line.append(' ');
- var button = $('
');
- button.click(function() {
- rc.settings.remove_stringlist_field(id, next_value);
- });
- line.append(button);
-
- // Add the new item
- container.append(line);
-
- // Increment the next counter
- next.val(parseInt(next_value)+1);
- },
-
- remove_stringlist_field: function(id, line) {
- $("#settings_"+id+"_line"+line).remove();
- },
-
- add_hash_field: function(id) {
- var container = $('#container_'+id);
- var next = $('#settings_'+id+'_next');
- var next_value = next.val();
-
- var line = $('
');
- line.attr('id', 'settings_'+id+'_line'+next.val());
-
- var hash_key = $('
');
- var hash_value = $('
');
- hash_key.change(function() {
- $('#setting_'+id+'_value'+next_value).attr('name', id+'['+$(this).val()+']');
- })
-
- line.append(hash_key).append(' ').append(hash_value).append(' ');
- var button = $('
');
- button.click(function() {
- rc.settings.remove_hash_field(id, next_value);
- });
- line.append(button);
-
- // Add the new item
- container.append(line);
-
- // Increment the next counter
- next.val(parseInt(next_value)+1);
- },
-
- remove_hash_field: function(id, line) {
- $("#settings_"+id+"_line"+line).remove();
- },
-
- save: function() {
-
- var settings = {};
-
- var fields = $("input.setting").get();
- for (var i in fields) {
- var setting = fields[i];
- var name = setting.name;
- var value;
-
- switch(setting.type) {
- case 'checkbox':
- value = $(setting).is(':checked') ? 1 : 0;
- break;
- default:
- value = setting.value;
- }
-
- if (/\[\]$/.test(name)) {
- if (! settings[name]) {
- settings[name] = [];
- }
- settings[name].push(value);
- } else {
- settings[name] = value;
- }
- }
-
- rc.ajax.post(base_url + "ajax/update-settings/", settings);
-
- }
-
- }
-
-};
-
-$(document).ready(rc.init);
diff --git a/webui/source/pages/sources/delete.php b/webui/source/pages/sources/delete.php
deleted file mode 100644
index 028b791..0000000
--- a/webui/source/pages/sources/delete.php
+++ /dev/null
@@ -1,28 +0,0 @@
-request();
-$config = $main->config();
-
-// Grab the name of this source
-$encoded_filename = null;
-if ($req->exists('confirm')) {
- $plugin = $req->get('plugin', 'RippingCluster_Exception_InvalidParameters');
- $encoded_filename = $req->get('id', 'RippingCluster_Exception_InvalidParameters');
-
- $source = RippingCluster_Source_PluginFactory::loadEncoded($plugin, $encoded_filename, false);
- $source->delete();
-
- // Redirect back to the sources page
- RippingCluster_Page::redirect('rips/sources');
-
-} else {
- $plugin = $req->get('plugin', 'RippingCluster_Exception_InvalidParameters');
- $encoded_filename = $req->get('id', 'RippingCluster_Exception_InvalidParameters');
-
- $source = RippingCluster_Source_PluginFactory::loadEncoded($plugin, $encoded_filename, false);
-
- $this->smarty->assign('source', $source);
-}
-
-?>
\ No newline at end of file
diff --git a/webui/source/templates/fragments/admin-setting-row.tpl b/webui/source/templates/fragments/admin-setting-row.tpl
deleted file mode 100644
index f151e91..0000000
--- a/webui/source/templates/fragments/admin-setting-row.tpl
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- {$name}
-
-
-
-
-
- {include file="fragments/admin-setting-value.tpl"}
-
-
\ No newline at end of file
diff --git a/webui/source/templates/fragments/new-setting-dialog.tpl b/webui/source/templates/fragments/new-setting-dialog.tpl
deleted file mode 100644
index fcea745..0000000
--- a/webui/source/templates/fragments/new-setting-dialog.tpl
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/webui/source/templates/index.tpl b/webui/source/templates/index.tpl
deleted file mode 100644
index 7fc5951..0000000
--- a/webui/source/templates/index.tpl
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
Ripping Cluster WebUI
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Ripping Cluster WebUI
-
-
-
- {include file="navigation.tpl"}
-
-
-
-
-
-
-
-
- {if $messages}
-
- {foreach from=$messages item=message}
- {$message}
- {/foreach}
-
- {/if}
-
- {$page_content}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/webui/source/templates/navigation.tpl b/webui/source/templates/navigation.tpl
deleted file mode 100644
index ebf75dd..0000000
--- a/webui/source/templates/navigation.tpl
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/webui/source/templates/sources/delete.tpl b/webui/source/templates/sources/delete.tpl
deleted file mode 100644
index b57ca62..0000000
--- a/webui/source/templates/sources/delete.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-
Delete Source
-
-
- Are you sure you want to delete {$source->plugin()|escape:"html"}:{$source->filename()|escape:"html"}?
- [ Delete
- | Cancel ]
-
diff --git a/webui/styles/normal.css b/webui/styles/normal.css
deleted file mode 100644
index 295a321..0000000
--- a/webui/styles/normal.css
+++ /dev/null
@@ -1,190 +0,0 @@
-body {
- margin: 0em;
- padding: 0em;
- background: #a7a09a;
- font-family: verdana, helvetica, sans-serif;
-}
-
-a {
- color: gray;
-}
-
-label {
- margin-left: 1em;
- margin-right: 1em;
-}
-
-#container {
- width: 75%;
- min-width: 75em;
- margin: auto;
-}
-
-#banner {
- margin: 0em;
- padding: 0em;
- background: #eeeeee;
-}
-
-#banner h1 {
- padding: 0.5em;
-}
-
-#navigation {
- background: #eeeeee;
- margin-top: 0em;
- margin-bottom: 1em;
- padding: 0.2em;
-}
-
-#navigation ul {
- margin: 0em;
- padding: 0em 5em;;
- list-style: none;
-}
-
-#navigation li {
- margin: 1em;
- padding: 0em;
- display: inline;
-}
-
-#page-container {
- margin: 0em;
- padding: 0em;
-}
-
-#sidebar {
- float: left;
- width: 20em;
- margin-bottom: 1em;
-
- background: #eeeeee;
-}
-
-#page {
- margin-left: 21em;
- margin-bottom: 1em;
- padding: 0.5em;
-
- background: #eeeeee;
-}
-
-#footer {
- clear: both;
- padding: 2em;
- font-size: smaller;
- font-style: italic;
-
- background: #eeeeee;
- color: #333333;
-
-}
-
-#errors {
- background: peachpuff;
- color: darkred;
- margin: 1em;
-}
-
-#messages {
- background: lightcyan;
- color: darkblue;
- margin: 1em;
-}
-
-/* Centred dialog taken from http://stackoverflow.com/questions/1205457/how-to-design-a-css-for-a-centered-floating-confirm-dialog */
-#centrepoint {
- top: 50%;
- left: 50%;
- position: absolute;
-}
-#dialog {
- position: relative;
- width: 600px;
- margin-left: -300px;
- /*height: 20em;*/
- margin-top: -20em;
-
- display: none;
- background: #eeeeee;
- border: 2px solid #a7a09a;
-}
-#dialogheader {
- height: 2em;
- width: 100%;
- margin: 0.3em;
-}
-#dialogheadertitle {
- color: black;
- font-weight: bold;
- float: left;
-}
-#dialogheaderclose {
- width: 1.2em;
- height: 1.2em;
- background-color: crimson;
- color: white;
- border: 1px solid fireBrick;
- float: right;
- margin-right: 1em;
- text-align: center;
- vertical-align: middle;
- display: table-cell;
- font-weight: bold;
- cursor: pointer;
-}
-#dialogcontent {
- padding: 0.5em;
-}
-.dialogfooterbuttonset {
- display: none;
- text-align: right;
-}
-
-table#settings {
-
-}
-
-table#settings td {
- padding: 1.0em;
- border: 1px solid;
- border-collapse: collapse;
-}
-
-table#settings input[type=text] {
- width: 40em;
-}
-table#settings input.hash_key {
- width: 10em;
-}
-table#settings input.hash_value {
- width: 25em;
-}
-.settings_addfieldcontainer {
- text-align: right;
-}
-
-.default {
- background: beige;
- color: darkgray;
- font-style: italic;
-}
-
-.icon {
- height: 16px;
- width: 16px;
-}
-
-form#setup-rips input[type="text"] {
- width: 30em;
-}
-
-#quantizer-slider {
- width: 20em;
-}
-
-select.rip-streams {
- width: 20em;
-}
-