diff --git a/dist/addon.xml b/dist/addon.xml index a77a33d4..11ba4a96 100755 --- a/dist/addon.xml +++ b/dist/addon.xml @@ -1,7 +1,7 @@ diff --git a/dist/js/kodi-webinterface.js b/dist/js/kodi-webinterface.js index d4bef4bc..282be147 100644 --- a/dist/js/kodi-webinterface.js +++ b/dist/js/kodi-webinterface.js @@ -1,4 +1,4 @@ -/*! Chorus 2 - A web interface for Kodi. Created by Jeremy Graham - built on 28-07-2018 */ +/*! Chorus 2 - A web interface for Kodi. Created by Jeremy Graham - built on 14-10-2018 */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=ea.type(a);return"function"===c||ea.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(ea.isFunction(b))return ea.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return ea.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ma.test(b))return ea.filter(b,a,c);b=ea.filter(b,a)}return ea.grep(a,function(a){return ea.inArray(a,b)>=0!==c})}function e(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function f(a){var b=ua[a]={};return ea.each(a.match(ta)||[],function(a,c){b[c]=!0}),b}function g(){oa.addEventListener?(oa.removeEventListener("DOMContentLoaded",h,!1),a.removeEventListener("load",h,!1)):(oa.detachEvent("onreadystatechange",h),a.detachEvent("onload",h))}function h(){(oa.addEventListener||"load"===event.type||"complete"===oa.readyState)&&(g(),ea.ready())}function i(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(za,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ya.test(c)?ea.parseJSON(c):c}catch(e){}ea.data(a,b,c)}else c=void 0}return c}function j(a){var b;for(b in a)if(("data"!==b||!ea.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function k(a,b,c,d){if(ea.acceptData(a)){var e,f,g=ea.expando,h=a.nodeType,i=h?ea.cache:a,j=h?a[g]:a[g]&&g;if(j&&i[j]&&(d||i[j].data)||void 0!==c||"string"!=typeof b)return j||(j=h?a[g]=W.pop()||ea.guid++:g),i[j]||(i[j]=h?{}:{toJSON:ea.noop}),("object"==typeof b||"function"==typeof b)&&(d?i[j]=ea.extend(i[j],b):i[j].data=ea.extend(i[j].data,b)),f=i[j],d||(f.data||(f.data={}),f=f.data),void 0!==c&&(f[ea.camelCase(b)]=c),"string"==typeof b?(e=f[b],null==e&&(e=f[ea.camelCase(b)])):e=f,e}}function l(a,b,c){if(ea.acceptData(a)){var d,e,f=a.nodeType,g=f?ea.cache:a,h=f?a[ea.expando]:ea.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){ea.isArray(b)?b=b.concat(ea.map(b,ea.camelCase)):b in d?b=[b]:(b=ea.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!j(d):!ea.isEmptyObject(d))return}(c||(delete g[h].data,j(g[h])))&&(f?ea.cleanData([a],!0):ca.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function m(){return!0}function n(){return!1}function o(){try{return oa.activeElement}catch(a){}}function p(a){var b=Ka.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function q(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==xa?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==xa?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||ea.nodeName(d,b)?f.push(d):ea.merge(f,q(d,b));return void 0===b||b&&ea.nodeName(a,b)?ea.merge([a],f):f}function r(a){Ea.test(a.type)&&(a.defaultChecked=a.checked)}function s(a,b){return ea.nodeName(a,"table")&&ea.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function t(a){return a.type=(null!==ea.find.attr(a,"type"))+"/"+a.type,a}function u(a){var b=Va.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function v(a,b){for(var c,d=0;null!=(c=a[d]);d++)ea._data(c,"globalEval",!b||ea._data(b[d],"globalEval"))}function w(a,b){if(1===b.nodeType&&ea.hasData(a)){var c,d,e,f=ea._data(a),g=ea._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)ea.event.add(b,c,h[c][d])}g.data&&(g.data=ea.extend({},g.data))}}function x(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!ca.noCloneEvent&&b[ea.expando]){e=ea._data(b);for(d in e.events)ea.removeEvent(b,d,e.handle);b.removeAttribute(ea.expando)}"script"===c&&b.text!==a.text?(t(b).text=a.text,u(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),ca.html5Clone&&a.innerHTML&&!ea.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Ea.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function y(b,c){var d,e=ea(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:ea.css(e[0],"display");return e.detach(),f}function z(a){var b=oa,c=_a[a];return c||(c=y(a,b),"none"!==c&&c||($a=($a||ea("'; - return API.openModal(title, msg, true, 'video'); + msgHtml = ''; + return API.openModal(titleHtml, msgHtml, true, 'video'); }); - App.commands.setHandler("ui:modal:options", function(title, items) { + App.commands.setHandler("ui:modal:options", function(titleHtml, items) { var $options; $options = API.buildOptions(items); - return API.openModal(title, $options, true, 'options'); + return API.openModal(titleHtml, $options, true, 'options'); }); App.commands.setHandler("ui:playermenu", function(op) { return API.playerMenu(op); diff --git a/dist/lang/en/app-readme.html b/dist/lang/en/app-readme.html index 4dd3a1c0..58747bf8 100644 --- a/dist/lang/en/app-readme.html +++ b/dist/lang/en/app-readme.html @@ -60,8 +60,9 @@

Kodi API browser

Contributing

If you would like to make this project better I would appreciate any help. There is a develop branch for each version of Kodi. Please do pull requests against the dev branch for the correct version (even better if you can do a PR for both). -Leia (v18) dev branch is 18.x-dev, Krypton (v17) dev branch is 17.x-dev. I am happy to assist with getting an -development environment up and running if you are happy to contribute.

+Leia (v18) dev branch is 18.x-dev, Krypton (v17) dev branch is 17.x-dev. See the +developers documentation for information about +getting a dev environment up and running then compiling the project using docker.

Translations

I only know English so definitely need help with this. I also don't know heaps about javascript multilingual stuff but thanks to @mizaki we have a structure ready to go. So it should be nice and easy to translate the UI.

@@ -71,20 +72,6 @@

Translations

against 18.x-dev and/or 17.x-dev, or if you don't know git, a link to the language file.

Language Files here. English is the only real complete translation file so start with that as your base.

-

Compiling

-

Sass and Grunt are used to compile css and js in the dist folder. -To get your environment setup first install Bundler and npm.

- -

If you are updating (eg. git pull), always do an npm update and bundle update to ensure all the tools are in the toolbox.

-

Build

-

A build will also include translation files.

-

Are you a fan of Chorus? You can buy Jeremy a beer to say thanks :)

License

diff --git a/dist/lang/en/developers.html b/dist/lang/en/developers.html new file mode 100644 index 00000000..9292a385 --- /dev/null +++ b/dist/lang/en/developers.html @@ -0,0 +1,29 @@ +

Developers information

+

Do you want to help with making Chorus even better? Find help below...

+

This page contains information about getting your dev environment up and running so you can build and test your +changes without the hassle of setting up all the required dependencies.

+

Docker dev environment

+

Included in this repo is a Dockerfile which builds the Chorus 2 dev environment image. If you wanted to develop +without using docker, this is a good reference as to what you need installed on your pc.

+

If you want to make your live much easier, just install docker then grab the pre-built image from docker hub.

+
docker pull jez500/chorus2-dev:latest
+

Installing dev dependencies

+

Once you have the docker dev image, you can use this to do all your development related tasks. The first of these should +be installing all the nodejs/ruby dependencies.

+
docker run -tiP -v `pwd`:/app jez500/chorus2-dev:latest ./build.sh install
+

This will run npm install and bundle install inside the dev container.

+

You should only need to do this once, unless... package.json or Gemfile are updated

+

Building/Compiling the project

+

If you have made changes to some coffee script or sass, you can build those changes via executing commands inside +the dev container. To get a command line in the container:

+
docker run -tiP -v `pwd`:/app jez500/chorus2-dev:latest bash
+

Once inside the dev container, you can do the following:

+

Build

+

This will build languages, documentation, js and css.

+
grunt build
+

Watch for changes (continuously build)

+

This will only build js and css.

+
grunt
+

Committing your changes

+

As a rule of thumb, you should not commit any compiled files unless you are building a release. Eg. only commit files +in the src folder.

diff --git a/dist/lang/fr/lang-readme.html b/dist/lang/fr/lang-readme.html index 9aca7370..48c54bde 100644 --- a/dist/lang/fr/lang-readme.html +++ b/dist/lang/fr/lang-readme.html @@ -26,7 +26,7 @@

Rajoute une nouvelle langue

Dites-le à l'application

Vous devez aussi dire à l'application de rajouter cette langue comme option. Pour cela il faut éditer ce fichier /src/js/helpers/translate.js.coffee et rajouter fr: "French" aux langues dans getLanguages.

-

Dupliquez la structure de fichier et de répertoire de en

+

Dupliquez la structure de fichier et de répertoire de en

Copiez les fichiers que vous voulez traduire: