- /*
- * Loading gallery
- */
- ScanGalleryPerspective.prototype.refreshGallery = function(success, failure) {
- var self = this;
- this.doc.refreshGallery({
- success: function(doc, data){
- self.$image.show();
- console.log("gconfig:", self.config().page );
- self.setPage( self.config().page );
- $('#imagesCount').html("/" + doc.galleryImages.length);
-
- $('.error_message', self.$element).hide();
- if(success) success();
- },
- failure: function(doc, message){
- self.$image.hide();
- $('.error_message', self.$element).show().html(message);
- if(failure) failure();
- }
- });