├── .gitignore ├── README.md ├── gnucash_rest.wsgi ├── gnucash_rest ├── __init__.py └── gnucash_simple.py ├── swagger.yaml ├── tests.py └── www ├── css ├── bootstrap.css ├── bootstrap.css.map ├── bootstrap.min.css ├── bootstrap.min.css.map ├── gnucash.css └── loader.css ├── favicon.ico ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── img ├── glyphicons-halflings-white.png └── glyphicons-halflings.png ├── index.html ├── js ├── angular-animate.min.js ├── angular-route.min.js ├── angular-select2 │ ├── .bower.json │ ├── README.md │ ├── bower.json │ ├── dist │ │ ├── angular-select2.js │ │ └── angular-select2.min.js │ ├── package.json │ └── test-config.js ├── angular.min.js ├── app.js ├── controllers │ ├── account.js │ ├── bill.js │ ├── customer.js │ ├── invoice.js │ ├── report.js │ ├── session.js │ └── vendor.js ├── core │ ├── account.module.js │ ├── bill.module.js │ ├── core.module.js │ ├── customer.module.js │ ├── entry.module.js │ ├── invoice.module.js │ ├── session.module.js │ ├── transaction.module.js │ └── vendor.module.js ├── date.js ├── jquery │ ├── .bower.json │ ├── AUTHORS.txt │ ├── LICENSE.txt │ ├── README.md │ ├── bower.json │ ├── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ ├── external │ │ └── sizzle │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── sizzle.js │ │ │ ├── sizzle.min.js │ │ │ └── sizzle.min.map │ └── src │ │ ├── ajax.js │ │ ├── ajax │ │ ├── jsonp.js │ │ ├── load.js │ │ ├── script.js │ │ ├── var │ │ │ ├── location.js │ │ │ ├── nonce.js │ │ │ └── rquery.js │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── attributes │ │ ├── attr.js │ │ ├── classes.js │ │ ├── prop.js │ │ ├── support.js │ │ └── val.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── core │ │ ├── DOMEval.js │ │ ├── access.js │ │ ├── camelCase.js │ │ ├── init.js │ │ ├── isAttached.js │ │ ├── nodeName.js │ │ ├── parseHTML.js │ │ ├── parseXML.js │ │ ├── ready-no-deferred.js │ │ ├── ready.js │ │ ├── readyException.js │ │ ├── stripAndCollapse.js │ │ ├── support.js │ │ ├── toType.js │ │ └── var │ │ │ └── rsingleTag.js │ │ ├── css.js │ │ ├── css │ │ ├── addGetHookIf.js │ │ ├── adjustCSS.js │ │ ├── curCSS.js │ │ ├── finalPropName.js │ │ ├── hiddenVisibleSelectors.js │ │ ├── showHide.js │ │ ├── support.js │ │ └── var │ │ │ ├── cssExpand.js │ │ │ ├── getStyles.js │ │ │ ├── isHiddenWithinTree.js │ │ │ ├── rboxStyle.js │ │ │ ├── rcustomProp.js │ │ │ ├── rnumnonpx.js │ │ │ └── swap.js │ │ ├── data.js │ │ ├── data │ │ ├── Data.js │ │ └── var │ │ │ ├── acceptData.js │ │ │ ├── dataPriv.js │ │ │ └── dataUser.js │ │ ├── deferred.js │ │ ├── deferred │ │ └── exceptionHook.js │ │ ├── deprecated.js │ │ ├── deprecated │ │ ├── ajax-event-alias.js │ │ └── event.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── effects │ │ ├── Tween.js │ │ └── animatedSelector.js │ │ ├── event.js │ │ ├── event │ │ ├── focusin.js │ │ ├── support.js │ │ └── trigger.js │ │ ├── exports │ │ ├── amd.js │ │ └── global.js │ │ ├── jquery.js │ │ ├── manipulation.js │ │ ├── manipulation │ │ ├── _evalUrl.js │ │ ├── buildFragment.js │ │ ├── getAll.js │ │ ├── setGlobalEval.js │ │ ├── support.js │ │ ├── var │ │ │ ├── rscriptType.js │ │ │ └── rtagName.js │ │ └── wrapMap.js │ │ ├── offset.js │ │ ├── queue.js │ │ ├── queue │ │ └── delay.js │ │ ├── selector-native.js │ │ ├── selector-sizzle.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── traversing.js │ │ ├── traversing │ │ ├── findFilter.js │ │ └── var │ │ │ ├── dir.js │ │ │ ├── rneedsContext.js │ │ │ └── siblings.js │ │ ├── var │ │ ├── ObjectFunctionString.js │ │ ├── arr.js │ │ ├── class2type.js │ │ ├── document.js │ │ ├── documentElement.js │ │ ├── flat.js │ │ ├── fnToString.js │ │ ├── getProto.js │ │ ├── hasOwn.js │ │ ├── indexOf.js │ │ ├── isFunction.js │ │ ├── isWindow.js │ │ ├── pnum.js │ │ ├── push.js │ │ ├── rcheckableType.js │ │ ├── rcssNum.js │ │ ├── rnothtmlwhite.js │ │ ├── rtrimCSS.js │ │ ├── slice.js │ │ ├── support.js │ │ ├── toString.js │ │ └── whitespace.js │ │ └── wrap.js ├── ngStorage.js ├── select2 │ ├── .bower.json │ ├── .gitignore │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── component.json │ ├── composer.json │ ├── package.json │ ├── release.sh │ ├── select2-bootstrap.css │ ├── select2-spinner.gif │ ├── select2.css │ ├── select2.jquery.json │ ├── select2.js │ ├── select2.min.js │ ├── select2.png │ ├── select2_locale_ar.js │ ├── select2_locale_az.js │ ├── select2_locale_bg.js │ ├── select2_locale_ca.js │ ├── select2_locale_cs.js │ ├── select2_locale_da.js │ ├── select2_locale_de.js │ ├── select2_locale_el.js │ ├── select2_locale_en.js.template │ ├── select2_locale_es.js │ ├── select2_locale_et.js │ ├── select2_locale_eu.js │ ├── select2_locale_fa.js │ ├── select2_locale_fi.js │ ├── select2_locale_fr.js │ ├── select2_locale_gl.js │ ├── select2_locale_he.js │ ├── select2_locale_hr.js │ ├── select2_locale_hu.js │ ├── select2_locale_id.js │ ├── select2_locale_is.js │ ├── select2_locale_it.js │ ├── select2_locale_ja.js │ ├── select2_locale_ka.js │ ├── select2_locale_ko.js │ ├── select2_locale_lt.js │ ├── select2_locale_lv.js │ ├── select2_locale_mk.js │ ├── select2_locale_ms.js │ ├── select2_locale_nb.js │ ├── select2_locale_nl.js │ ├── select2_locale_pl.js │ ├── select2_locale_pt-BR.js │ ├── select2_locale_pt-PT.js │ ├── select2_locale_ro.js │ ├── select2_locale_rs.js │ ├── select2_locale_ru.js │ ├── select2_locale_sk.js │ ├── select2_locale_sv.js │ ├── select2_locale_th.js │ ├── select2_locale_tr.js │ ├── select2_locale_ug-CN.js │ ├── select2_locale_uk.js │ ├── select2_locale_vi.js │ ├── select2_locale_zh-CN.js │ ├── select2_locale_zh-TW.js │ └── select2x2.png ├── ui-bootstrap.min.js └── utilities.js └── partials ├── accounts ├── detail.html ├── fragments │ ├── form.html │ └── transactionform.html └── index.html ├── bills ├── detail.html ├── fragments │ ├── entryform.html │ ├── form.html │ ├── payform.html │ ├── postform.html │ └── unpostform.html └── index.html ├── customers ├── detail.html ├── fragments │ └── form.html └── index.html ├── invoices ├── detail.html ├── fragments │ ├── entryform.html │ ├── form.html │ ├── payform.html │ ├── postform.html │ └── unpostform.html ├── index.html └── print.html ├── reports ├── income-statement.html └── index.html ├── session ├── delete.html └── fragments │ └── form.html └── vendors ├── detail.html ├── fragments └── form.html └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | *.pyc 3 | *.pyo 4 | 5 | -------------------------------------------------------------------------------- /gnucash_rest.wsgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import sys 3 | import logging 4 | 5 | # Log to stderr? 6 | logging.basicConfig(stream=sys.stderr) 7 | 8 | # Set python paths so the gnucash, gnucash_rest and gnucash_simple module can be found 9 | sys.path.insert(0,"/var/www/gnucash-rest") 10 | sys.path.insert(0,"/var/www/gnucash-rest/gnucash_rest") 11 | sys.path.insert(0,"/usr/local/lib/python3/dist-packages") 12 | 13 | # Load application via 14 | from gnucash_rest import app as application 15 | 16 | # Set variables 17 | #application.connection_string = '/home/wsgi/gnucash.gnucash' 18 | 19 | -------------------------------------------------------------------------------- /www/css/gnucash.css: -------------------------------------------------------------------------------- 1 | [ng-click], [data-ng-click], [x-ng-click] { 2 | cursor: pointer; 3 | } 4 | 5 | .modal-body { 6 | max-height: calc(100vh - 200px); 7 | overflow-y: auto; 8 | } 9 | 10 | .navbar .navbar-right { 11 | float: right; 12 | } 13 | 14 | .select2-container { 15 | padding: 0px; 16 | } 17 | 18 | .select2-container .select2-choice { 19 | height: 33px; 20 | padding-top: 3px; 21 | } -------------------------------------------------------------------------------- /www/css/loader.css: -------------------------------------------------------------------------------- 1 | /* https://github.com/lukehaas/css-loaders */ 2 | 3 | .loader, 4 | .loader:before, 5 | .loader:after { 6 | border-radius: 50%; 7 | width: 2.5em; 8 | height: 2.5em; 9 | -webkit-animation-fill-mode: both; 10 | animation-fill-mode: both; 11 | -webkit-animation: load7 1.8s infinite ease-in-out; 12 | animation: load7 1.8s infinite ease-in-out; 13 | } 14 | .loader { 15 | color: #000000; 16 | font-size: 10px; 17 | margin: 80px auto; 18 | position: relative; 19 | text-indent: -9999em; 20 | -webkit-transform: translateZ(0); 21 | -ms-transform: translateZ(0); 22 | transform: translateZ(0); 23 | -webkit-animation-delay: -0.16s; 24 | animation-delay: -0.16s; 25 | } 26 | .loader:before, 27 | .loader:after { 28 | content: ''; 29 | position: absolute; 30 | top: 0; 31 | } 32 | .loader:before { 33 | left: -3.5em; 34 | -webkit-animation-delay: -0.32s; 35 | animation-delay: -0.32s; 36 | } 37 | .loader:after { 38 | left: 3.5em; 39 | } 40 | @-webkit-keyframes load7 { 41 | 0%, 42 | 80%, 43 | 100% { 44 | box-shadow: 0 2.5em 0 -1.3em; 45 | } 46 | 40% { 47 | box-shadow: 0 2.5em 0 0; 48 | } 49 | } 50 | @keyframes load7 { 51 | 0%, 52 | 80%, 53 | 100% { 54 | box-shadow: 0 2.5em 0 -1.3em; 55 | } 56 | 40% { 57 | box-shadow: 0 2.5em 0 0; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/favicon.ico -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /www/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /www/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /www/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loftx/gnucash-rest/a426593f4b78c47b6a7faea91d4c0ce33814bbca/www/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Gnucash Web 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 51 | 52 | 53 | 54 | 55 | 76 | 77 |
78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /www/js/angular-select2/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-select2", 3 | "version": "1.5.3", 4 | "main": "dist/angular-select2.js", 5 | "ignore": [ 6 | "**/.*", 7 | "src", 8 | "node_modules", 9 | "bower_components", 10 | "test", 11 | "Gruntfile.js" 12 | ], 13 | "dependencies": { 14 | "angular": "^1.4.0", 15 | "select2": "~3.5.2" 16 | }, 17 | "devDependencies": { 18 | "angular-mocks": "^1.4.0" 19 | }, 20 | "homepage": "https://github.com/rubenv/angular-select2", 21 | "_release": "1.5.3", 22 | "_resolution": { 23 | "type": "version", 24 | "tag": "v1.5.3", 25 | "commit": "b8ba37976e84122bf165fb48dd50b0e3ef217b18" 26 | }, 27 | "_source": "https://github.com/rubenv/angular-select2.git", 28 | "_target": "^1.5.3", 29 | "_originalSource": "angular-select2", 30 | "_direct": true 31 | } -------------------------------------------------------------------------------- /www/js/angular-select2/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-select2", 3 | "version": "1.5.3", 4 | "main": "dist/angular-select2.js", 5 | "ignore": [ 6 | "**/.*", 7 | "src", 8 | "node_modules", 9 | "bower_components", 10 | "test", 11 | "Gruntfile.js" 12 | ], 13 | "dependencies": { 14 | "angular": "^1.4.0", 15 | "select2": "~3.5.2" 16 | }, 17 | "devDependencies": { 18 | "angular-mocks": "^1.4.0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /www/js/angular-select2/dist/angular-select2.min.js: -------------------------------------------------------------------------------- 1 | angular.module("rt.select2",[]).value("select2Config",{}).factory("select2Stack",function(){var a=[];return{$register:function(b){a.push(b)},$unregister:function(b){var c=a.indexOf(b);c!==-1&&a.splice(c,1)},closeAll:function(){a.forEach(function(a){a.close()})}}}).directive("select2",["$rootScope","$timeout","$parse","$filter","select2Config","select2Stack",function(a,b,c,d,e,f){"use strict";function g(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}var h=d("filter"),i={},j=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/;return e&&angular.extend(i,e),{require:"ngModel",priority:1,restrict:"E",template:'',replace:!0,link:function(a,d,e,k){function l(b){if(q){var c=q(a);if(c)return h(b,c)}return b}function m(a){n(p?function(b){for(var c=[],d=0;d-1&&c.push(e)}a(c)}:function(){a(r[k.$viewValue]||{obj:{}})})}var n,o=angular.extend({},i,a.$eval(e.options)),p=angular.isDefined(e.multiple)||o.multiple;o.multiple=p,p&&(k.$isEmpty=function(a){return!a||0===a.length}),e.placeholder&&(o.placeholder=e.placeholder);var q=c(e.optionsFilter),r={};if(e.s2Options){var s;if(!(s=e.s2Options.match(j)))throw new Error("Invalid s2Options encountered!");var t=c(s[2]||s[1]),u=c(s[7]),v=s[4]||s[6],w=c(s[2]?s[1]:v),x=s[5];n=function(b){r={};for(var c=l(u(a)),d=(x?g(c):c)||[],e=[],f=0;f-1&&e.push({id:j,text:k,obj:c[i]})}b.callback({results:e})},a.$watch(s[7],function(){k.$render()})}else{if(!o.query)throw new Error("You need to supply a query function!");var y=o.query;o.query=function(a){var b=a.callback;a.callback=function(a){for(var c=0;c= 1.7.1", 24 | "_originalSource": "jquery" 25 | } -------------------------------------------------------------------------------- /www/js/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /www/js/jquery/README.md: -------------------------------------------------------------------------------- 1 | # jQuery 2 | 3 | > jQuery is a fast, small, and feature-rich JavaScript library. 4 | 5 | For information on how to get started and how to use jQuery, please see [jQuery's documentation](https://api.jquery.com/). 6 | For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery). 7 | 8 | If upgrading, please see the [blog post for 3.6.1](https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/). This includes notable differences from the previous version and a more readable changelog. 9 | 10 | ## Including jQuery 11 | 12 | Below are some of the most common ways to include jQuery. 13 | 14 | ### Browser 15 | 16 | #### Script tag 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | #### Babel 23 | 24 | [Babel](https://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. 25 | 26 | ```js 27 | import $ from "jquery"; 28 | ``` 29 | 30 | #### Browserify/Webpack 31 | 32 | There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.js.org/). For more information on using these tools, please refer to the corresponding project's documentation. In the script, including jQuery will usually look like this... 33 | 34 | ```js 35 | var $ = require( "jquery" ); 36 | ``` 37 | 38 | #### AMD (Asynchronous Module Definition) 39 | 40 | AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](https://requirejs.org/docs/whyamd.html). 41 | 42 | ```js 43 | define( [ "jquery" ], function( $ ) { 44 | 45 | } ); 46 | ``` 47 | 48 | ### Node 49 | 50 | To include jQuery in [Node](https://nodejs.org/), first install with npm. 51 | 52 | ```sh 53 | npm install jquery 54 | ``` 55 | 56 | For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/jsdom/jsdom). This can be useful for testing purposes. 57 | 58 | ```js 59 | const { JSDOM } = require( "jsdom" ); 60 | const { window } = new JSDOM( "" ); 61 | const $ = require( "jquery" )( window ); 62 | ``` 63 | -------------------------------------------------------------------------------- /www/js/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /www/js/jquery/external/sizzle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/sizzle 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /www/js/jquery/src/ajax/jsonp.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/isFunction", 4 | "./var/nonce", 5 | "./var/rquery", 6 | "../ajax" 7 | ], function( jQuery, isFunction, nonce, rquery ) { 8 | 9 | "use strict"; 10 | 11 | var oldCallbacks = [], 12 | rjsonp = /(=)\?(?=&|$)|\?\?/; 13 | 14 | // Default jsonp settings 15 | jQuery.ajaxSetup( { 16 | jsonp: "callback", 17 | jsonpCallback: function() { 18 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); 19 | this[ callback ] = true; 20 | return callback; 21 | } 22 | } ); 23 | 24 | // Detect, normalize options and install callbacks for jsonp requests 25 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 26 | 27 | var callbackName, overwritten, responseContainer, 28 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 29 | "url" : 30 | typeof s.data === "string" && 31 | ( s.contentType || "" ) 32 | .indexOf( "application/x-www-form-urlencoded" ) === 0 && 33 | rjsonp.test( s.data ) && "data" 34 | ); 35 | 36 | // Handle iff the expected data type is "jsonp" or we have a parameter to set 37 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 38 | 39 | // Get callback name, remembering preexisting value associated with it 40 | callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? 41 | s.jsonpCallback() : 42 | s.jsonpCallback; 43 | 44 | // Insert callback into url or form data 45 | if ( jsonProp ) { 46 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 47 | } else if ( s.jsonp !== false ) { 48 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 49 | } 50 | 51 | // Use data converter to retrieve json after script execution 52 | s.converters[ "script json" ] = function() { 53 | if ( !responseContainer ) { 54 | jQuery.error( callbackName + " was not called" ); 55 | } 56 | return responseContainer[ 0 ]; 57 | }; 58 | 59 | // Force json dataType 60 | s.dataTypes[ 0 ] = "json"; 61 | 62 | // Install callback 63 | overwritten = window[ callbackName ]; 64 | window[ callbackName ] = function() { 65 | responseContainer = arguments; 66 | }; 67 | 68 | // Clean-up function (fires after converters) 69 | jqXHR.always( function() { 70 | 71 | // If previous value didn't exist - remove it 72 | if ( overwritten === undefined ) { 73 | jQuery( window ).removeProp( callbackName ); 74 | 75 | // Otherwise restore preexisting value 76 | } else { 77 | window[ callbackName ] = overwritten; 78 | } 79 | 80 | // Save back as free 81 | if ( s[ callbackName ] ) { 82 | 83 | // Make sure that re-using the options doesn't screw things around 84 | s.jsonpCallback = originalSettings.jsonpCallback; 85 | 86 | // Save the callback name for future use 87 | oldCallbacks.push( callbackName ); 88 | } 89 | 90 | // Call if it was a function and we have a response 91 | if ( responseContainer && isFunction( overwritten ) ) { 92 | overwritten( responseContainer[ 0 ] ); 93 | } 94 | 95 | responseContainer = overwritten = undefined; 96 | } ); 97 | 98 | // Delegate to script 99 | return "script"; 100 | } 101 | } ); 102 | 103 | } ); 104 | -------------------------------------------------------------------------------- /www/js/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/stripAndCollapse", 4 | "../var/isFunction", 5 | "../core/parseHTML", 6 | "../ajax", 7 | "../traversing", 8 | "../manipulation", 9 | "../selector" 10 | ], function( jQuery, stripAndCollapse, isFunction ) { 11 | 12 | "use strict"; 13 | 14 | /** 15 | * Load a url into a page 16 | */ 17 | jQuery.fn.load = function( url, params, callback ) { 18 | var selector, type, response, 19 | self = this, 20 | off = url.indexOf( " " ); 21 | 22 | if ( off > -1 ) { 23 | selector = stripAndCollapse( url.slice( off ) ); 24 | url = url.slice( 0, off ); 25 | } 26 | 27 | // If it's a function 28 | if ( isFunction( params ) ) { 29 | 30 | // We assume that it's the callback 31 | callback = params; 32 | params = undefined; 33 | 34 | // Otherwise, build a param string 35 | } else if ( params && typeof params === "object" ) { 36 | type = "POST"; 37 | } 38 | 39 | // If we have elements to modify, make the request 40 | if ( self.length > 0 ) { 41 | jQuery.ajax( { 42 | url: url, 43 | 44 | // If "type" variable is undefined, then "GET" method will be used. 45 | // Make value of this field explicit since 46 | // user can override it through ajaxSetup method 47 | type: type || "GET", 48 | dataType: "html", 49 | data: params 50 | } ).done( function( responseText ) { 51 | 52 | // Save response for use in complete callback 53 | response = arguments; 54 | 55 | self.html( selector ? 56 | 57 | // If a selector was specified, locate the right elements in a dummy div 58 | // Exclude scripts to avoid IE 'Permission Denied' errors 59 | jQuery( "
" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 60 | 61 | // Otherwise use the full result 62 | responseText ); 63 | 64 | // If the request succeeds, this function gets "data", "status", "jqXHR" 65 | // but they are ignored because response was set above. 66 | // If it fails, this function gets "jqXHR", "status", "error" 67 | } ).always( callback && function( jqXHR, status ) { 68 | self.each( function() { 69 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 70 | } ); 71 | } ); 72 | } 73 | 74 | return this; 75 | }; 76 | 77 | } ); 78 | -------------------------------------------------------------------------------- /www/js/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../ajax" 5 | ], function( jQuery, document ) { 6 | 7 | "use strict"; 8 | 9 | // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10 | jQuery.ajaxPrefilter( function( s ) { 11 | if ( s.crossDomain ) { 12 | s.contents.script = false; 13 | } 14 | } ); 15 | 16 | // Install script dataType 17 | jQuery.ajaxSetup( { 18 | accepts: { 19 | script: "text/javascript, application/javascript, " + 20 | "application/ecmascript, application/x-ecmascript" 21 | }, 22 | contents: { 23 | script: /\b(?:java|ecma)script\b/ 24 | }, 25 | converters: { 26 | "text script": function( text ) { 27 | jQuery.globalEval( text ); 28 | return text; 29 | } 30 | } 31 | } ); 32 | 33 | // Handle cache's special case and crossDomain 34 | jQuery.ajaxPrefilter( "script", function( s ) { 35 | if ( s.cache === undefined ) { 36 | s.cache = false; 37 | } 38 | if ( s.crossDomain ) { 39 | s.type = "GET"; 40 | } 41 | } ); 42 | 43 | // Bind script tag hack transport 44 | jQuery.ajaxTransport( "script", function( s ) { 45 | 46 | // This transport only deals with cross domain or forced-by-attrs requests 47 | if ( s.crossDomain || s.scriptAttrs ) { 48 | var script, callback; 49 | return { 50 | send: function( _, complete ) { 51 | script = jQuery( "