diff --git a/templates/skin/developer-jquery/actions/ActionPhotoset/add.tpl b/templates/skin/developer-jquery/actions/ActionPhotoset/add.tpl
index 612f4708..94d55b0b 100644
--- a/templates/skin/developer-jquery/actions/ActionPhotoset/add.tpl
+++ b/templates/skin/developer-jquery/actions/ActionPhotoset/add.tpl
@@ -116,7 +116,7 @@ tinyMCE.init({
- upload
+ upload
@@ -183,7 +183,7 @@ tinyMCE.init({
{$aLang.topic_photoset_upload_rules|ls_lang:"SIZE%%`$oConfig->get('module.topic.photoset.photo_max_size')`":"COUNT%%`$oConfig->get('module.topic.photoset.count_photos_max')`"}
- Загрузить фото
+ Загрузить фото
{if count($aPhotos)}
@@ -193,13 +193,13 @@ tinyMCE.init({
{/if}
-
-
- Удалить
+
+ Удалить
{if $bIsMainPhoto}
{$aLang.topic_photoset_is_preview}
{else}
- {$aLang.topic_photoset_mark_as_preview}
+ {$aLang.topic_photoset_mark_as_preview}
{/if}
diff --git a/templates/skin/developer-jquery/js/other.js b/templates/skin/developer-jquery/js/other.js
deleted file mode 100644
index 3530868a..00000000
--- a/templates/skin/developer-jquery/js/other.js
+++ /dev/null
@@ -1,103 +0,0 @@
-function addTopicImage(response)
-{
- if (!response.bStateError) {
- template = '
'
- +'
'
- +''+lsLang['delete']+''
- +''+lsLang['mark_as_preview']+' ';
- $('#swfu_images').append(template);
- ls.msg.notice(response.sMsgTitle,response.sMsg);
- } else {
- ls.msg.error(response.sMsgTitle,response.sMsg);
- }
- photosetCloseForm();
-}
-
-function deleteTopicImage(id)
-{
- ls.ajax(aRouter['photoset']+'deleteimage', {'id':id, 'security_ls_key': LIVESTREET_SECURITY_KEY }, function(response){
- if (!response.bStateError) {
- $('#photo_'+id).remove();
- ls.msg.notice(response.sMsgTitle,response.sMsg);
- } else {
- ls.msg.error('Error','Please try again later');
- }
- });
-}
-
-function setTopicMainPhoto(id)
-{
- $('#topic_main_photo').val(id);
-
- $('.marked-as-preview').each(function (index, el) {
- $(el).removeClass('marked-as-preview');
- $(el).children('span').html(''+lsLang['mark_as_preview']+'');
- });
- $('#photo_'+id).addClass('marked-as-preview');
- $('#photo_'+id).children('span').html(lsLang['preview']);
-}
-
-function topicImageSetDescription(id, text)
-{
- ls.ajax(aRouter['photoset']+'setimagedescription', {'id':id, 'text':text, 'security_ls_key': LIVESTREET_SECURITY_KEY }, function(result){
- if (!bStateError) {
-
- } else {
- msgErrorBox.alert('Error','Please try again later');
- }
- }
- )
-}
-
-function getMorePhotos(topic_id)
-{
- var last_id = $('#last_photo_id').val();
- ls.ajax(aRouter['photoset']+'getmore', {'topic_id':topic_id, 'last_id':last_id, 'security_ls_key': LIVESTREET_SECURITY_KEY }, function(result){
- if (!result.bStateError) {
- if (result.photos) {
- var photoNumber = $('#photo_number').val();
- $.each(result.photos, function(index, photo) {
- var image = ''+(photoNumber++)+'
!['+photo.description+']('+photo.path_thumb+')
';
- $('#topic-photo-images').append(image);
- $('#photo_number').val(photoNumber);
- $('#last_photo_id').val(photo.id);
- $('.photoset-image').unbind('click');
- $('.photoset-image').prettyPhoto({
- social_tools:'',
- show_title: false,
- slideshow:false,
- deeplinking: false
- });
- });
- } else {
- $('#topic-photo-more').remove();
- }
- } else {
- msgErrorBox.alert('Error','Please try again later');
- }
- });
-}
-
-function photosetUploadPhoto()
-{
- ls.ajaxSubmit(aRouter['photoset']+'upload/',$('#photoset-upload-form'),function(data){
- if (data.bStateError) {
- ls.msg.error(data.sMsgTitle,data.sMsg);
- } else {
- addTopicImage(data);
- }
- });
- photosetCloseForm();
-}
-
-function photosetCloseForm() {
- $('#photoset-upload-form').css('left', '-300px');
-}
-
-function photosetShowUploadForm()
-{
- if ($('#photoset-upload-file').length) {
- $('#photoset-upload-file').val( '');
- }
- $('#photoset-upload-form').css('left', '50%');
-}
\ No newline at end of file
diff --git a/templates/skin/developer-jquery/js/photoset.js b/templates/skin/developer-jquery/js/photoset.js
new file mode 100644
index 00000000..26e8ca8b
--- /dev/null
+++ b/templates/skin/developer-jquery/js/photoset.js
@@ -0,0 +1,109 @@
+var ls = ls || {};
+
+ls.photoset =( function ($) {
+ this.addPhoto = function(response)
+ {
+ if (!response.bStateError) {
+ template = '
'
+ +'
'
+ +''+lsLang['delete']+''
+ +''+lsLang['mark_as_preview']+' ';
+ $('#swfu_images').append(template);
+ ls.msg.notice(response.sMsgTitle,response.sMsg);
+ } else {
+ ls.msg.error(response.sMsgTitle,response.sMsg);
+ }
+ photosetCloseForm();
+ }
+
+ this.deletePhoto = function(id)
+ {
+ ls.ajax(aRouter['photoset']+'deleteimage', {'id':id}, function(response){
+ if (!response.bStateError) {
+ $('#photo_'+id).remove();
+ ls.msg.notice(response.sMsgTitle,response.sMsg);
+ } else {
+ ls.msg.error('Error','Please try again later');
+ }
+ });
+ }
+
+ this.setPreview =function(id)
+ {
+ $('#topic_main_photo').val(id);
+
+ $('.marked-as-preview').each(function (index, el) {
+ $(el).removeClass('marked-as-preview');
+ $(el).children('span').html(''+lsLang['mark_as_preview']+'');
+ });
+ $('#photo_'+id).addClass('marked-as-preview');
+ $('#photo_'+id).children('span').html(lsLang['preview']);
+ }
+
+ this.setPreviewDescription = function(id, text)
+ {
+ ls.ajax(aRouter['photoset']+'setimagedescription', {'id':id, 'text':text}, function(result){
+ if (!bStateError) {
+
+ } else {
+ ls.msg.error('Error','Please try again later');
+ }
+ }
+ )
+ }
+
+ this. getMore = function(topic_id)
+ {
+ var last_id = $('#last_photo_id').val();
+ ls.ajax(aRouter['photoset']+'getmore', {'topic_id':topic_id, 'last_id':last_id}, function(result){
+ if (!result.bStateError) {
+ if (result.photos) {
+ var photoNumber = $('#photo_number').val();
+ $.each(result.photos, function(index, photo) {
+ var image = ''+(photoNumber++)+'
!['+photo.description+']('+photo.path_thumb+')
';
+ $('#topic-photo-images').append(image);
+ $('#photo_number').val(photoNumber);
+ $('#last_photo_id').val(photo.id);
+ $('.photoset-image').unbind('click');
+ $('.photoset-image').prettyPhoto({
+ social_tools:'',
+ show_title: false,
+ slideshow:false,
+ deeplinking: false
+ });
+ });
+ } else {
+ $('#topic-photo-more').remove();
+ }
+ } else {
+ ls.msg.error('Error','Please try again later');
+ }
+ });
+ }
+
+ this.upload = function()
+ {
+ ls.ajaxSubmit(aRouter['photoset']+'upload/',$('#photoset-upload-form'),function(data){
+ if (data.bStateError) {
+ ls.msg.error(data.sMsgTitle,data.sMsg);
+ } else {
+ ls.photoset.addPhoto(data);
+ }
+ });
+ ls.photoset.closeForm();
+ }
+
+ this.closeForm = function()
+ {
+ $('#photoset-upload-form').css('left', '-300px');
+ }
+
+ this.showForm = function()
+ {
+ if ($('#photoset-upload-file').length) {
+ $('#photoset-upload-file').val( '');
+ }
+ $('#photoset-upload-form').css('left', '50%');
+ }
+ return this;
+}).call(ls.photoset || {},jQuery);
\ No newline at end of file
diff --git a/templates/skin/developer-jquery/settings/config/config.php b/templates/skin/developer-jquery/settings/config/config.php
index d3f49aa3..87fa9d08 100644
--- a/templates/skin/developer-jquery/settings/config/config.php
+++ b/templates/skin/developer-jquery/settings/config/config.php
@@ -25,7 +25,7 @@ $config['head']['default']['js'] = array(
"___path.static.skin___/js/friend.js",
"___path.static.skin___/js/userfeed.js",
"___path.static.skin___/js/stream.js",
- "___path.static.skin___/js/other.js",
+ "___path.static.skin___/js/photoset.js",
);
$config['head']['default']['css'] = array(
"___path.static.skin___/css/reset.css",
diff --git a/templates/skin/developer-jquery/topic_photoset.tpl b/templates/skin/developer-jquery/topic_photoset.tpl
index 6e57b61d..67ba9e17 100644
--- a/templates/skin/developer-jquery/topic_photoset.tpl
+++ b/templates/skin/developer-jquery/topic_photoset.tpl
@@ -80,7 +80,7 @@
- {$aLang.topic_photoset_show_more} ↓
+ {$aLang.topic_photoset_show_more} ↓
{/if}