Browse Source

sincro file con quelle caricate sul server

cri 8 years ago
parent
commit
fc0c1d0298
2 changed files with 44 additions and 36 deletions
  1. 2 2
      app/scripts/arkiwi.js
  2. 42 34
      app/scripts/main.js

+ 2 - 2
app/scripts/arkiwi.js

@@ -149,7 +149,7 @@ ARKIWI.Arkiwi.prototype.close = function (callback) {
 ARKIWI.Arkiwi.prototype.path = function (path, callback, notBase64) {
     var pathType = notBase64 ? 'path' : 'path64';
 
-    $.getJSON(this.endpoint + '/' + pathType + '/' + path + '/jsonml/?' + this.defaultParameters, function (result) {
+    $.getJSON(this.endpoint + '/' + pathType + '/' + path + '/json/?' + this.defaultParameters, function (result) {
         if (callback != undefined)
             callback(result);
     }).fail(function (error) {
@@ -165,7 +165,7 @@ ARKIWI.Arkiwi.prototype.search = function (query, callback, jailFolder) {
 
     sanitizedQuery = window.btoa(sanitizedQuery); //convert to Base64
 
-    $.getJSON(this.endpoint + '/search64/' + sanitizedQuery + '/jsonml/?' + this.defaultParameters, function (result) {
+    $.getJSON(this.endpoint + '/search64/' + sanitizedQuery + '/json/?' + this.defaultParameters, function (result) {
         if (callback != undefined)
             callback(result);
     }).fail(function (error) {

+ 42 - 34
app/scripts/main.js

@@ -1,36 +1,44 @@
-/*------------------------------------------------------------------------------------------------------------------------
- @package: arkiwiJsBoilerplate
-
- @author: cek
- @www: arkiwi.oeg
-
- @copyright: COPYRIGHT 18 cek
- @license: MIT
-
- =============================================================================
- Filename: main.js
- =============================================================================
- This file is the main entry point for js on the arkiwiJsBoilerplate app.
- --------------------------------------------------------------------------------------------------------------------- */
-$(document).ready(function () {
-    var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
-    $.get("templates/list.txt", function (template) {
-
-	arkiwi.path("XM24", function (listone) {
-	var dioporco = Mustache.render(template, listone);
+/*------------------------------------------------------------------------------------------------------------------------
+ @package: arkiwiJsBoilerplate
+
+ @author: cek
+ @www: arkiwi.oeg
+
+ @copyright: COPYRIGHT 18 cek
+ @license: MIT
+
+ =============================================================================
+ Filename: main.js
+ =============================================================================
+ This file is the main entry point for js on the arkiwiJsBoilerplate app.
+ --------------------------------------------------------------------------------------------------------------------- */
+$(document).ready(function () {
+    var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
+    $.get("templates/list.txt", function (template) {
+
+	arkiwi.path("XM24", function (listone) {
+	var dioporco = Mustache.render(template, listone);
 	$(".row").append(dioporco);
 	},true);
-});
-
-
-    var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
-    arkiwi.search('Ampioraggio', function (result) {
-        console.log('Ricerca...');
-        console.log(result);
-    });
-
-    arkiwi.path('XM24', function (result) {
-        console.log('Lettura cartella...');
-        console.log(result);
-    }, true);
-});
+
+
+
+});
+
+
+
+
+
+
+
+arkiwi.search('Ampioraggio', function (result) {
+        console.log('Ricerca...');
+        console.log(result);
+
+    });
+
+    arkiwi.path('XM24', function (result) {
+        console.log('Lettura cartella...');
+        console.log(result);
+    }, true);
+});