1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-19 17:28:23 +03:00

Мелкие исправления

This commit is contained in:
Denis Shakhov 2015-10-13 23:22:36 +07:00
parent 5823baf3b1
commit 4bb997ea9f
4 changed files with 5 additions and 5 deletions

View file

@ -219,7 +219,7 @@
add: function( form, list, modal ) {
this.answerIndex( list );
ls.ajax.submit( this.option( 'urls.add' ), form, function( response ) {
this._submit( 'add', form, function( response ) {
this.elements.list.append( response.item );
modal.hide();
}.bind(this), { submitButton: modal.element.find( 'button[type=submit]' ) });
@ -235,7 +235,7 @@
update: function( form, list, modal ) {
this.answerIndex( list );
ls.ajax.submit( this.option( 'urls.update' ), form, function( response ) {
this._submit( 'update', form, function( response ) {
this.elements.list.find( this.option( 'selectors.item' ) + '[data-poll-id=' + response.id + ']' ).replaceWith( response.item );
modal.hide();
}.bind(this), { submitButton: modal.element.find( 'button[type=submit]' ) });

View file

@ -83,7 +83,7 @@
* Голосование
*/
vote: function( abstain ) {
ls.ajax.submit( this.option( 'urls.vote' ), this.elements.form, function( response ) {
this._submit( 'vote', this.elements.form, function( response ) {
this.element.html( $.trim( response.sText ) );
this.initResult();

View file

@ -54,7 +54,7 @@
// Отправка формы
form.on( 'submit', function ( event ) {
ls.ajax.submit( _this.option( 'urls.add' ), form, function( response ) {
_this._submit( 'add', form, function( response ) {
modal.hide();
});

View file

@ -112,7 +112,7 @@
* Превью текста
*/
previewShow: function() {
ls.ajax.submit( this.option( 'urls.preview' ), this.element, function( response ) {
this._submit( 'preview', this.element, function( response ) {
if ( response.bStateError ) {
ls.msg.error( null, response.sMsg );
} else {