mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-19 17:28:23 +03:00
Мелкие исправления
This commit is contained in:
parent
5823baf3b1
commit
4bb997ea9f
|
@ -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]' ) });
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue