wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r19741: LJSUP-8713

Committer: wisest-owl
LJSUP-8713

U   trunk/htdocs/editjournal.bml
U   trunk/htdocs/update.bml
Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-08-16 09:26:32 UTC (rev 19740)
+++ trunk/htdocs/editjournal.bml	2011-08-16 09:43:01 UTC (rev 19741)
@@ -7,6 +7,10 @@
     use vars qw(%GET %POST);
     BML::decl_params(_default => qr/./);
 
+    use LJ::Fotki::Photo;
+    use LJ::Fotki::Album;	
+    use LJ::Widget::Fotki::Upload;
+
     my $head     = \$_[0]->{'head'};
     my $bodyopts = \$_[0]->{'bodyopts'};
 
@@ -477,7 +481,8 @@
                 my $user_groups = LJ::JSON->to_json (LJ::Widget::Fotki::Photo->get_user_groups ($remote));
         		my $comm = LJ::load_user($LJ::LJPHOTO_ALLOW_FROM_COMMUNITY);
         		my $ljphoto_enabled = $remote && $remote->is_mutual_friend($comm) ? 1 : 0;
-                LJ::need_res('stc/pics/pics.css', 'js/swfupload/swfupload.js', 'js/swfupload/swfupload.queue.js', 'js/jquery/jquery.lj.photouploader.js');
+                
+				LJ::Widget::Fotki::Upload->render();
 
                 $ret .= <<JS;
         <script type="text/javascript">
@@ -488,37 +493,7 @@
                 albumsData: $album_list_json,
                 privacyData: $user_groups,
                 type: 'upload',
-                guid: '$auth_token',
-
-                ml: {
-JS
-                    $ret .= "'fotki.album.add.images': '".BML::ml('fotki.add.images')."',"
-                    ."'fotki.album.link.click.to.upload': '".BML::ml('fotki.album.link.click.to.upload')."',"
-                    ."'fotki.album.upload.images': '".BML::ml('fotki.album.upload.images')."',"
-	                ."'fotki.album.add.photos': '".BML::ml('fotki.album.add.photos')."',"
-	                ."'fotki.album.upgrade': '".BML::ml('fotki.album.upgrade')."',"
-	                ."'fotki.album.add.image.name': '".BML::ml('fotki.album.add.image.name')."',"
-	                ."'fotki.album.description': '".BML::ml('fotki.album.description')."',"
-	                ."'fotki.album.album_cover': '".BML::ml('fotki.album.album_cover')."',"
-	                ."'fotki.album.remove.this.image': '".BML::ml('fotki.album.remove.this.image')."',"
-	                ."'fotki.album.select_album': '".BML::ml('fotki.album.select_album')."',"
-	                ."'fotki.album.new.album.name': '".BML::ml('fotki.album.new.album.name')."',"
-	                ."'fotki.album.post.images': '".BML::ml('fotki.album.post.images')."',"
-	                ."'fotki.album.save.images': '".BML::ml('fotki.album.save.images')."',"
-	                ."'fotki.privacy': '".BML::ml('fotki.privacy')."',"
-	                ."'fotki.album.resize.to.post': '".BML::ml('fotki.album.resize.to.post')."',"
-	                ."'fotki.album.stop.upload.confirm': '".BML::ml('fotki.album.stop.upload.confirm')."',"
-	                ."'fotki.album.close.without.saving.confirm': '".BML::ml('fotki.album.close.without.saving.confirm')."',"
-	                ."'fotki.album.upload.unknown.error': '".BML::ml('fotki.album.upload.unknown.error')."',"
-	                ."'fotki.album.upload.io.error': '".BML::ml('fotki.album.upload.io.error')."',"
-	                ."'fotki.album.uploading.image': '".BML::ml('fotki.album.uploading.image')."',"
-	                ."'fotki.album.available.now': '".BML::ml('fotki.album.available.now')."',"
-	    			."'fotki.album.click.image': '".BML::ml('fotki.album.click.image')."',"
-					."'fotki.album.uploading.message': '".BML::ml('fotki.album.uploading.message')."',"
-	    			."'fotki.album.remove.image': '".BML::ml('fotki.album.remove.image')."',"
-	                ."'fotki.album.create.new': '".BML::ml('fotki.album.create.new')."'";
-                $ret .= <<JS;
-                }
+                guid: '$auth_token'
             });
         </script>
 JS

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-08-16 09:26:32 UTC (rev 19740)
+++ trunk/htdocs/update.bml	2011-08-16 09:43:01 UTC (rev 19741)
@@ -6,6 +6,7 @@
 
     use LJ::Fotki::Photo;
     use LJ::Fotki::Album;
+	use LJ::Widget::Fotki::Upload;
 
     # $_[0] is a pre-request scratch area
     # put variables here so that we can access them later
@@ -429,9 +430,10 @@
 
             my $auth_token = LJ::Auth->sessionless_auth_token ($LJ::DOMAIN_WEB."/pics/upload", user => $remote ? $remote->user : undef);
             my $user_groups = LJ::JSON->to_json (LJ::Widget::Fotki::Photo->get_user_groups ($remote));
-            LJ::need_res('stc/pics/pics.css', 'js/swfupload/swfupload.js', 'js/swfupload/swfupload.queue.js', 'js/jquery/jquery.lj.photouploader.js');
-		
             my $ljphoto_enabled = $remote->can_upload_photo();
+            
+			LJ::Widget::Fotki::Upload->render();
+		
             $$body .= <<JS;
     <script type="text/javascript">
     	window.ljphotoEnabled = $ljphoto_enabled;
@@ -441,37 +443,7 @@
             albumsData: $album_list_json,
             privacyData: $user_groups,
             type: 'upload',
-            guid: '$auth_token',
-		
-            ml: {
-JS
-                $$body .= "'fotki.album.add.images': '".BML::ml('fotki.album.add.images')."',"
-                ."'fotki.album.link.click.to.upload': '".BML::ml('fotki.album.link.click.to.upload')."',"
-                ."'fotki.album.upload.images': '".BML::ml('fotki.album.upload.images')."',"
-                ."'fotki.album.add.photos': '".BML::ml('fotki.album.add.photos')."',"
-                ."'fotki.album.upgrade': '".BML::ml('fotki.album.upgrade')."',"
-                ."'fotki.album.add.image.name': '".BML::ml('fotki.album.add.image.name')."',"
-                ."'fotki.album.description': '".BML::ml('fotki.album.description')."',"
-                ."'fotki.album.album_cover': '".BML::ml('fotki.album.album_cover')."',"
-                ."'fotki.album.remove.this.image': '".BML::ml('fotki.album.remove.this.image')."',"
-                ."'fotki.album.select_album': '".BML::ml('fotki.album.select_album')."',"
-                ."'fotki.album.new.album.name': '".BML::ml('fotki.album.new.album.name')."',"
-                ."'fotki.album.post.images': '".BML::ml('fotki.album.post.images')."',"
-                ."'fotki.album.save.images': '".BML::ml('fotki.album.save.images')."',"
-                ."'fotki.privacy': '".BML::ml('fotki.privacy')."',"
-                ."'fotki.album.resize.to.post': '".BML::ml('fotki.album.resize.to.post')."',"
-                ."'fotki.album.stop.upload.confirm': '".BML::ml('fotki.album.stop.upload.confirm')."',"
-                ."'fotki.album.close.without.saving.confirm': '".BML::ml('fotki.album.close.without.saving.confirm')."',"
-                ."'fotki.album.upload.unknown.error': '".BML::ml('fotki.album.upload.unknown.error')."',"
-                ."'fotki.album.upload.io.error': '".BML::ml('fotki.album.upload.io.error')."',"
-                ."'fotki.album.uploading.image': '".BML::ml('fotki.album.uploading.image')."',"
-                ."'fotki.album.available.now': '".BML::ml('fotki.album.available.now')."',"
-    			."'fotki.album.click.image': '".BML::ml('fotki.album.click.image')."',"
-				."'fotki.album.uploading.message': '".BML::ml('fotki.album.uploading.message')."',"
-    			."'fotki.album.remove.image': '".BML::ml('fotki.album.remove.image')."',"
-                ."'fotki.album.create.new': '".BML::ml('fotki.album.create.new')."'";
-            $$body .= <<JS;
-            }
+            guid: '$auth_token'
         });
     </script>
 JS

Tags: bml, livejournal, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments