author | Michael Krelin <hacker@klever.net> | 2011-08-28 16:57:16 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-08-28 16:57:16 (UTC) |
commit | 0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac (patch) (unidiff) | |
tree | 8e496ae35eae9e4e09a8daef17d1bee9589dda61 /content | |
parent | 63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e (diff) | |
download | fireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.zip fireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.tar.gz fireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.tar.bz2 |
more jsonifications
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | content/fireflix.js | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/content/fireflix.js b/content/fireflix.js index 34cfd3e..f30daee 100644 --- a/content/fireflix.js +++ b/content/fireflix.js | |||
@@ -505,303 +505,299 @@ var fireflix = { | |||
505 | this.disableProps(); | 505 | this.disableProps(); |
506 | this.upload_file_props.hidden = true; | 506 | this.upload_file_props.hidden = true; |
507 | }else{ | 507 | }else{ |
508 | var inactives = f.state!='pending'; | 508 | var inactives = f.state!='pending'; |
509 | this.upload_filename.value = f.file; this.upload_filename.disabled = inactives; | 509 | this.upload_filename.value = f.file; this.upload_filename.disabled = inactives; |
510 | this.upload_title.value = f.title; this.upload_title.disabled = inactives; | 510 | this.upload_title.value = f.title; this.upload_title.disabled = inactives; |
511 | this.upload_file_preview.src = 'file:///'+f.file; | 511 | this.upload_file_preview.src = 'file:///'+f.file; |
512 | this.upload_tags.value = f.tags; this.upload_tags.disabled = inactives; | 512 | this.upload_tags.value = f.tags; this.upload_tags.disabled = inactives; |
513 | this.upload_is_public.checked = f.is_public; this.upload_is_public.disabled = inactives; | 513 | this.upload_is_public.checked = f.is_public; this.upload_is_public.disabled = inactives; |
514 | this.upload_is_friends.checked = f.is_friend; this.upload_is_friends.disabled = inactives; | 514 | this.upload_is_friends.checked = f.is_friend; this.upload_is_friends.disabled = inactives; |
515 | this.upload_is_family.checked = f.is_family; this.upload_is_family.disabled = inactives; | 515 | this.upload_is_family.checked = f.is_family; this.upload_is_family.disabled = inactives; |
516 | if(f.state=='failed') { | 516 | if(f.state=='failed') { |
517 | this.upload_failure.textContent=((f.flickr_errcode<0)?'':f.flickr_errcode+': ')+f.flickr_errmsg; | 517 | this.upload_failure.textContent=((f.flickr_errcode<0)?'':f.flickr_errcode+': ')+f.flickr_errmsg; |
518 | this.upload_failure.hidden = false; | 518 | this.upload_failure.hidden = false; |
519 | }else{ | 519 | }else{ |
520 | this.upload_failure.hidden = true; | 520 | this.upload_failure.hidden = true; |
521 | } | 521 | } |
522 | this.upload_file_props.hidden = false; | 522 | this.upload_file_props.hidden = false; |
523 | } | 523 | } |
524 | }else{ | 524 | }else{ |
525 | var ftitle = null; var onetitle = true; | 525 | var ftitle = null; var onetitle = true; |
526 | var ftags = null; var onetag = true; | 526 | var ftags = null; var onetag = true; |
527 | var fs = 0; | 527 | var fs = 0; |
528 | for(var ff in this.files) { | 528 | for(var ff in this.files) { |
529 | if(this.selection.isSelected(ff) && this.files[ff].state=='pending' ) { | 529 | if(this.selection.isSelected(ff) && this.files[ff].state=='pending' ) { |
530 | ++fs; | 530 | ++fs; |
531 | if(ftitle==null) { | 531 | if(ftitle==null) { |
532 | ftitle = this.files[ff].title; | 532 | ftitle = this.files[ff].title; |
533 | }else if(ftitle!=this.files[ff].title) { | 533 | }else if(ftitle!=this.files[ff].title) { |
534 | onetitle = false; | 534 | onetitle = false; |
535 | } | 535 | } |
536 | if(ftags==null) { | 536 | if(ftags==null) { |
537 | ftags = this.files[ff].tags; | 537 | ftags = this.files[ff].tags; |
538 | }else if(ftags!=this.files[ff].tags) { | 538 | }else if(ftags!=this.files[ff].tags) { |
539 | onetag = false; | 539 | onetag = false; |
540 | } | 540 | } |
541 | } | 541 | } |
542 | } | 542 | } |
543 | if(fs) { | 543 | if(fs) { |
544 | this.upload_filename.value=''; | 544 | this.upload_filename.value=''; |
545 | this.upload_filename.disabled = true; | 545 | this.upload_filename.disabled = true; |
546 | if(onetitle) | 546 | if(onetitle) |
547 | this.upload_title.value = ftitle; | 547 | this.upload_title.value = ftitle; |
548 | this.upload_title.disabled = false; | 548 | this.upload_title.disabled = false; |
549 | if(onetag) | 549 | if(onetag) |
550 | this.upload_tags.value = ftags; | 550 | this.upload_tags.value = ftags; |
551 | this.upload_tags.disabled = false; | 551 | this.upload_tags.disabled = false; |
552 | this.upload_file_preview.src = null; | 552 | this.upload_file_preview.src = null; |
553 | this.upload_failure.hidden = true; | 553 | this.upload_failure.hidden = true; |
554 | this.upload_file_props.hidden = false; | 554 | this.upload_file_props.hidden = false; |
555 | }else | 555 | }else |
556 | this.disableProps(); | 556 | this.disableProps(); |
557 | this.upload_file_props.hidden = true; | 557 | this.upload_file_props.hidden = true; |
558 | } | 558 | } |
559 | }, | 559 | }, |
560 | propsToSel: function(prop) { | 560 | propsToSel: function(prop) { |
561 | if(this.selection.count<=0) return; | 561 | if(this.selection.count<=0) return; |
562 | for(var ff in this.files) { | 562 | for(var ff in this.files) { |
563 | if(this.selection.isSelected(ff) && this.files[ff].state=='pending') { | 563 | if(this.selection.isSelected(ff) && this.files[ff].state=='pending') { |
564 | if(prop=='filename') this.files[ff].file = this.upload_filename.value; | 564 | if(prop=='filename') this.files[ff].file = this.upload_filename.value; |
565 | if(prop=='title') this.files[ff].title = this.upload_title.value; | 565 | if(prop=='title') this.files[ff].title = this.upload_title.value; |
566 | if(prop=='tags') this.files[ff].tags = this.upload_tags.value; | 566 | if(prop=='tags') this.files[ff].tags = this.upload_tags.value; |
567 | if(prop=='is_public') this.files[ff].is_public = this.upload_is_public.checked; | 567 | if(prop=='is_public') this.files[ff].is_public = this.upload_is_public.checked; |
568 | if(prop=='is_friends') this.files[ff].is_friend = this.upload_is_friends.checked; | 568 | if(prop=='is_friends') this.files[ff].is_friend = this.upload_is_friends.checked; |
569 | if(prop=='is_family') this.files[ff].is_family = this.upload_is_family.checked; | 569 | if(prop=='is_family') this.files[ff].is_family = this.upload_is_family.checked; |
570 | this.tree.invalidateRow(ff); | 570 | this.tree.invalidateRow(ff); |
571 | } | 571 | } |
572 | } | 572 | } |
573 | }, | 573 | }, |
574 | 574 | ||
575 | on_upload: function() { | 575 | on_upload: function() { |
576 | this.selToProps(); | 576 | this.selToProps(); |
577 | this.batch_ids = new Array(); | 577 | this.batch_ids = new Array(); |
578 | this.upload_progress.value=0; | 578 | this.upload_progress.value=0; |
579 | this.upload_progress.setAttribute('hidden','false'); | 579 | this.upload_progress.setAttribute('hidden','false'); |
580 | this.upload_worker(); | 580 | this.upload_worker(); |
581 | }, | 581 | }, |
582 | on_clear: function() { | 582 | on_clear: function() { |
583 | this.clear_list(); | 583 | this.clear_list(); |
584 | }, | 584 | }, |
585 | on_remove: function() { | 585 | on_remove: function() { |
586 | if(this.selection.count) { | 586 | if(this.selection.count) { |
587 | this.tree.beginUpdateBatch(); | 587 | this.tree.beginUpdateBatch(); |
588 | for(var i=this.files.length-1;i>=0;--i) { | 588 | for(var i=this.files.length-1;i>=0;--i) { |
589 | if(this.selection.isSelected(i)) { | 589 | if(this.selection.isSelected(i)) { |
590 | this.files.splice(i,1); | 590 | this.files.splice(i,1); |
591 | this.rowCount--; | 591 | this.rowCount--; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | this.tree.endUpdateBatch(); | 594 | this.tree.endUpdateBatch(); |
595 | this.selection.clearSelection(); | 595 | this.selection.clearSelection(); |
596 | } | 596 | } |
597 | }, | 597 | }, |
598 | on_add: function() { | 598 | on_add: function() { |
599 | var ifp = Components.interfaces.nsIFilePicker; | 599 | var ifp = Components.interfaces.nsIFilePicker; |
600 | var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(ifp); | 600 | var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(ifp); |
601 | fp.init(window, "Select a File", ifp.modeOpenMultiple); | 601 | fp.init(window, "Select a File", ifp.modeOpenMultiple); |
602 | fp.appendFilters(ifp.filterImages); | 602 | fp.appendFilters(ifp.filterImages); |
603 | var rv = fp.show(); | 603 | var rv = fp.show(); |
604 | if(rv==ifp.returnOK) { | 604 | if(rv==ifp.returnOK) { |
605 | var ff = fp.files; | 605 | var ff = fp.files; |
606 | while(ff.hasMoreElements()) { | 606 | while(ff.hasMoreElements()) { |
607 | var f = ff.getNext(); | 607 | var f = ff.getNext(); |
608 | f.QueryInterface(Components.interfaces.nsIFile); | 608 | f.QueryInterface(Components.interfaces.nsIFile); |
609 | this.add(f.path); | 609 | this.add(f.path); |
610 | } | 610 | } |
611 | } | 611 | } |
612 | }, | 612 | }, |
613 | on_cmd_open: function(ev) { | 613 | on_cmd_open: function(ev) { |
614 | if(this.selection.currentIndex<0) return; | 614 | if(this.selection.currentIndex<0) return; |
615 | var f = this.files[this.selection.currentIndex]; | 615 | var f = this.files[this.selection.currentIndex]; |
616 | if(f.photoid) { | 616 | if(f.photoid) { |
617 | this.fireflix.openTab( | 617 | this.fireflix.openTab( |
618 | this.fireflix.flickr.make_uploader_edit_url(f.photoid) | 618 | this.fireflix.flickr.make_uploader_edit_url(f.photoid) |
619 | ); | 619 | ); |
620 | }else{ | 620 | }else{ |
621 | this.fireflix.openTab( 'file://'+f.file); | 621 | this.fireflix.openTab( 'file://'+f.file); |
622 | } | 622 | } |
623 | } | 623 | } |
624 | }, | 624 | }, |
625 | 625 | ||
626 | on_set_props: function() { | 626 | on_set_props: function() { |
627 | var pset = this.photosets.sets[this.photosets.selection.currentIndex]; | 627 | var pset = this.photosets.sets[this.photosets.selection.currentIndex]; |
628 | window.openDialog( | 628 | window.openDialog( |
629 | "chrome://fireflix/content/photoset-props.xul", | 629 | "chrome://fireflix/content/photoset-props.xul", |
630 | null, "dependent,modal,dialog,chrome", this, | 630 | null, "dependent,modal,dialog,chrome", this, |
631 | pset ); | 631 | pset ); |
632 | if(pset.dirty) { | 632 | if(pset.dirty) { |
633 | var _this = this; | 633 | var that = this; |
634 | this.flickr.api_call( | 634 | this.flickr.api_call_json( |
635 | { | 635 | { |
636 | method: 'flickr.photosets.editMeta', | 636 | method: 'flickr.photosets.editMeta', |
637 | auth_token: 'default', | 637 | auth_token: 'default', |
638 | photoset_id: pset.id, | 638 | photoset_id: pset.id, |
639 | title: pset.title, | 639 | title: pset.title, |
640 | description: pset.description | 640 | description: pset.description |
641 | }, function(xr) { | 641 | }, function(x,j) { |
642 | pset.dirty = false; | 642 | pset.dirty = false; |
643 | _this.flickr.api_call( | 643 | that.flickr.api_call_json( |
644 | { | 644 | { |
645 | method: 'flickr.photosets.getPhotos', | 645 | method: 'flickr.photosets.getPhotos', |
646 | auth_token: 'default', | 646 | auth_token: 'default', |
647 | photoset_id: pset.id | 647 | photoset_id: pset.id |
648 | }, function(xr) { | 648 | }, function(x,j) { |
649 | var x = xr.responseXML; | 649 | var pp = j.photoset.photo; |
650 | var xp = x.evaluate( | ||
651 | '/rsp/photoset/photo', x, null, | ||
652 | XPathResult.ORDERED_NODE_ITERATOR_TYPE, null ); | ||
653 | var phids = new Array(); | 650 | var phids = new Array(); |
654 | var priph = null; | 651 | var priph = null; |
655 | var n; while(n=xp.iterateNext()) { | 652 | for(var i in pp) { |
656 | var pid = n.getAttribute('id'); | 653 | var pid = pp[i].id; |
657 | phids.push( pid ); | 654 | phids.push(pid); |
658 | if(pid==pset.primary && n.getAttribute('isprimary')!='1') | 655 | if(pid==pset.primary && pp[i].isprimary) priph = pid; |
659 | priph = pid; | ||
660 | } | 656 | } |
661 | if(priph) { | 657 | if(priph) { |
662 | _this.flickr.api_call( | 658 | that.flickr.api_call_json( |
663 | { | 659 | { |
664 | method: 'flickr.photosets.editPhotos', | 660 | method: 'flickr.photosets.editPhotos', |
665 | auth_token: 'default', | 661 | auth_token: 'default', |
666 | photoset_id: pset.id, | 662 | photoset_id: pset.id, |
667 | primary_photo_id: priph, | 663 | primary_photo_id: priph, |
668 | photo_ids: phids.join(',') | 664 | photo_ids: phids.join(',') |
669 | }, function() { }, function(x,s,c,m) { /* flickr.photosets.editPhotos */ | 665 | }, function() { }, function(x,s,c,m) { /* flickr.photosets.editPhotos */ |
670 | _this.flickr_failure(x,s,c,m); | 666 | that.flickr_failure(x,s,c,m); |
671 | } | 667 | } |
672 | ); | 668 | ); |
673 | } | 669 | } |
674 | }, function(x,s,c,m) { /* flickr.photosets.getPhotos */ | 670 | }, function(x,s,c,m) { /* flickr.photosets.getPhotos */ |
675 | _this.flickr_failure(x,s,c,m); | 671 | that.flickr_failure(x,s,c,m); |
676 | } | 672 | } |
677 | ); | 673 | ); |
678 | }, function(x,s,c,m) { /* flickr.photosets.editMeta */ | 674 | }, function(x,s,c,m) { /* flickr.photosets.editMeta */ |
679 | _this.flickr_failure(x,s,c,m); | 675 | that.flickr_failure(x,s,c,m); |
680 | } | 676 | } |
681 | ); | 677 | ); |
682 | } | 678 | } |
683 | }, | 679 | }, |
684 | on_refresh_sets: function() { | 680 | on_refresh_sets: function() { |
685 | this.refresh_sets(); | 681 | this.refresh_sets(); |
686 | }, | 682 | }, |
687 | on_cmd_sets_html: function(csfx,ev) { | 683 | on_cmd_sets_html: function(csfx,ev) { |
688 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); | 684 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); |
689 | var rv = this.build_html(this.photoset.photos,uti,utl); | 685 | var rv = this.build_html(this.photoset.photos,uti,utl); |
690 | this.popup_content(rv); | 686 | this.popup_content(rv); |
691 | }, | 687 | }, |
692 | on_cmd_setphotos_html: function(csfx,ev) { | 688 | on_cmd_setphotos_html: function(csfx,ev) { |
693 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); | 689 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); |
694 | var rv = ''; | 690 | var rv = ''; |
695 | for(var p in this.photoset.photos) { | 691 | for(var p in this.photoset.photos) { |
696 | if(this.photoset.selection.isSelected(p)) | 692 | if(this.photoset.selection.isSelected(p)) |
697 | rv += this.photo_html(this.photoset.photos[p],uti,utl)+'\n'; | 693 | rv += this.photo_html(this.photoset.photos[p],uti,utl)+'\n'; |
698 | } | 694 | } |
699 | this.popup_content(rv); | 695 | this.popup_content(rv); |
700 | }, | 696 | }, |
701 | 697 | ||
702 | on_cmd_uploads_html: function(csfx,ev) { | 698 | on_cmd_uploads_html: function(csfx,ev) { |
703 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); | 699 | var uti = csfx.charAt(0); var utl = csfx.charAt(1); |
704 | var pids = new Array(); | 700 | var pids = new Array(); |
705 | for(var f in this.uploads.files) { | 701 | for(var f in this.uploads.files) { |
706 | if(this.uploads.selection.isSelected(f)) | 702 | if(this.uploads.selection.isSelected(f)) |
707 | if(this.uploads.files[f].photoid) | 703 | if(this.uploads.files[f].photoid) |
708 | pids.push(this.uploads.files[f].photoid); | 704 | pids.push(this.uploads.files[f].photoid); |
709 | } | 705 | } |
710 | var pp = this.uploads.rowCount*2; if(pp>500) pp = 500; | 706 | var pp = this.uploads.rowCount*2; if(pp>500) pp = 500; |
711 | var _this = this; | 707 | var _this = this; |
712 | this.flickr.api_call( | 708 | this.flickr.api_call( |
713 | { | 709 | { |
714 | method: 'flickr.photos.search', | 710 | method: 'flickr.photos.search', |
715 | auth_token: 'default', | 711 | auth_token: 'default', |
716 | extras: 'original_format', | 712 | extras: 'original_format', |
717 | user_id: 'me', | 713 | user_id: 'me', |
718 | per_page: pp | 714 | per_page: pp |
719 | }, | 715 | }, |
720 | function(xr) { | 716 | function(xr) { |
721 | var x = xr.responseXML; | 717 | var x = xr.responseXML; |
722 | var rv = ''; | 718 | var rv = ''; |
723 | for(var pn in pids) { | 719 | for(var pn in pids) { |
724 | var p = pids[pn]; | 720 | var p = pids[pn]; |
725 | var pp = new Photo(xp_node('/rsp/photos/photo[@id='+p+']',x)); | 721 | var pp = new Photo(xp_node('/rsp/photos/photo[@id='+p+']',x)); |
726 | rv += _this.photo_html(pp,uti,utl)+'\n'; | 722 | rv += _this.photo_html(pp,uti,utl)+'\n'; |
727 | } | 723 | } |
728 | _this.popup_content(rv); | 724 | _this.popup_content(rv); |
729 | }, function(x,s,c,m) { | 725 | }, function(x,s,c,m) { |
730 | _this.flickr_failure(x,s,c,m); | 726 | _this.flickr_failure(x,s,c,m); |
731 | } | 727 | } |
732 | ); | 728 | ); |
733 | }, | 729 | }, |
734 | 730 | ||
735 | /* | 731 | /* |
736 | * | 732 | * |
737 | */ | 733 | */ |
738 | foundphotos: { | 734 | foundphotos: { |
739 | fireflix: null, | 735 | fireflix: null, |
740 | init: function(f) { | 736 | init: function(f) { |
741 | this.fireflix = f; | 737 | this.fireflix = f; |
742 | pull_elements(this,document,[ | 738 | pull_elements(this,document,[ |
743 | 'search_for','search_tags','search_mine', | 739 | 'search_for','search_tags','search_mine', |
744 | 'searchresult_props','search_photo', | 740 | 'searchresult_props','search_photo', |
745 | 'searchresult_title','searchresult_description', | 741 | 'searchresult_title','searchresult_description', |
746 | 'search_page','cmd_search_prev_page','cmd_search_next_page' | 742 | 'search_page','cmd_search_prev_page','cmd_search_next_page' |
747 | ]); | 743 | ]); |
748 | document.getElementById('searchresults').view = this; | 744 | document.getElementById('searchresults').view = this; |
749 | }, | 745 | }, |
750 | photos: new Array(), | 746 | photos: new Array(), |
751 | rowCount: 0, | 747 | rowCount: 0, |
752 | getCellText: function(r,c) { | 748 | getCellText: function(r,c) { |
753 | var p = this.photos[r]; | 749 | var p = this.photos[r]; |
754 | if(c.id=='sr_title') return p.title; | 750 | if(c.id=='sr_title') return p.title; |
755 | return c.id; | 751 | return c.id; |
756 | }, | 752 | }, |
757 | setTree: function(t) { this.tree = t }, | 753 | setTree: function(t) { this.tree = t }, |
758 | isContainer: function(r) { return false }, | 754 | isContainer: function(r) { return false }, |
759 | isSeparator: function(r) { return false }, | 755 | isSeparator: function(r) { return false }, |
760 | isSorted: function(r) { return false }, | 756 | isSorted: function(r) { return false }, |
761 | getLevel: function(r) { return 0 }, | 757 | getLevel: function(r) { return 0 }, |
762 | getImageSrc: function(r,c) { return null }, | 758 | getImageSrc: function(r,c) { return null }, |
763 | getRowProperties: function(r,p) { }, | 759 | getRowProperties: function(r,p) { }, |
764 | getCellProperties: function(cid,cel,p) { }, | 760 | getCellProperties: function(cid,cel,p) { }, |
765 | getColumnProperties: function(cid,cel,p) { }, | 761 | getColumnProperties: function(cid,cel,p) { }, |
766 | cycleHeader: function(cid,e) { }, | 762 | cycleHeader: function(cid,e) { }, |
767 | getParentIndex: function(r) { return -1 }, | 763 | getParentIndex: function(r) { return -1 }, |
768 | drop: function(r,o) { }, | 764 | drop: function(r,o) { }, |
769 | canDropBeforeAfter: function(r,b) { return false }, | 765 | canDropBeforeAfter: function(r,b) { return false }, |
770 | 766 | ||
771 | import_json: function(jp) { | 767 | import_json: function(jp) { |
772 | this.selection.clearSelection(); | 768 | this.selection.clearSelection(); |
773 | this.selection.currentIndex=-1; | 769 | this.selection.currentIndex=-1; |
774 | this.searchresult_props.hidden=true; | 770 | this.searchresult_props.hidden=true; |
775 | this.tree.beginUpdateBatch(); | 771 | this.tree.beginUpdateBatch(); |
776 | this.photos = new Array(); | 772 | this.photos = new Array(); |
777 | for(var i in jp) { | 773 | for(var i in jp) { |
778 | this.photos.push(new Photo(jp[i])); | 774 | this.photos.push(new Photo(jp[i])); |
779 | } | 775 | } |
780 | this.rowCount = this.photos.length; | 776 | this.rowCount = this.photos.length; |
781 | this.tree.endUpdateBatch(); | 777 | this.tree.endUpdateBatch(); |
782 | }, | 778 | }, |
783 | paging: { | 779 | paging: { |
784 | pars: null, | 780 | pars: null, |
785 | page: null, pages: null, perpage: null, total: null | 781 | page: null, pages: null, perpage: null, total: null |
786 | }, | 782 | }, |
787 | search_photos: function() { | 783 | search_photos: function() { |
788 | var pars = { | 784 | var pars = { |
789 | method: 'flickr.photos.search', | 785 | method: 'flickr.photos.search', |
790 | auth_token: 'default', | 786 | auth_token: 'default', |
791 | extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo' | 787 | extras: 'license,date_upload,date_taken,owner_name,icon_server,original_format,last_update,geo' |
792 | }; | 788 | }; |
793 | if(this.search_mine.checked) | 789 | if(this.search_mine.checked) |
794 | pars.user_id='me'; | 790 | pars.user_id='me'; |
795 | if(this.search_tags.checked) { | 791 | if(this.search_tags.checked) { |
796 | pars.tags=this.search_for.value.split(/ +/).join(','); | 792 | pars.tags=this.search_for.value.split(/ +/).join(','); |
797 | }else{ | 793 | }else{ |
798 | pars.text=this.search_for.value; | 794 | pars.text=this.search_for.value; |
799 | } | 795 | } |
800 | this.paging.pars = new Object(); | 796 | this.paging.pars = new Object(); |
801 | this.paging.page = null; this.paging.pages = null; | 797 | this.paging.page = null; this.paging.pages = null; |
802 | this.paging.perpage = null; this.paging.total = null; | 798 | this.paging.perpage = null; this.paging.total = null; |
803 | for(var p in pars) this.paging.pars[p] = pars[p]; | 799 | for(var p in pars) this.paging.pars[p] = pars[p]; |
804 | this.perform_search(pars); | 800 | this.perform_search(pars); |
805 | }, | 801 | }, |
806 | perform_search: function(p) { | 802 | perform_search: function(p) { |
807 | var that = this; | 803 | var that = this; |