mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-09 17:46:31 +02:00
render all modals via mustache
This commit is contained in:
@@ -1146,7 +1146,7 @@ function IFM( params ) {
|
|||||||
this.showFileDialog = function () {
|
this.showFileDialog = function () {
|
||||||
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
||||||
var content = arguments.length > 1 ? arguments[1] : "";
|
var content = arguments.length > 1 ? arguments[1] : "";
|
||||||
self.showModal( Mustache.render( self.templates.file, { filename: filename } ), { large: true } );
|
self.showModal( Mustache.render( self.templates.file, { filename: filename, i18n: self.i18n } ), { large: true } );
|
||||||
var form = $('#formFile');
|
var form = $('#formFile');
|
||||||
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
||||||
form.find('#buttonSave').on( 'click', function() {
|
form.find('#buttonSave').on( 'click', function() {
|
||||||
@@ -1251,7 +1251,7 @@ function IFM( params ) {
|
|||||||
* Shows the create directory dialog
|
* Shows the create directory dialog
|
||||||
*/
|
*/
|
||||||
this.showCreateDirDialog = function() {
|
this.showCreateDirDialog = function() {
|
||||||
self.showModal( self.templates.createdir );
|
self.showModal( Mustache.render( self.templates.createdir, { i18n: self.i18n } ) );
|
||||||
var form = $( '#formCreateDir' );
|
var form = $( '#formCreateDir' );
|
||||||
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonSave' ).on( 'click', function() {
|
form.find( '#buttonSave' ).on( 'click', function() {
|
||||||
@@ -1298,7 +1298,7 @@ function IFM( params ) {
|
|||||||
* @param string name - name of the file
|
* @param string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showDeleteFileDialog = function( filename ) {
|
this.showDeleteFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.deletefile, { filename: name } ) );
|
self.showModal( Mustache.render( self.templates.deletefile, { filename: name, i18n: self.i18n } ) );
|
||||||
var form = $( '#formDeleteFile' );
|
var form = $( '#formDeleteFile' );
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.deleteFile( filename );
|
self.deleteFile( filename );
|
||||||
@@ -1342,7 +1342,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showRenameFileDialog = function( filename ) {
|
this.showRenameFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename } ) );
|
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename, i18n: self.i18n } ) );
|
||||||
var form = $( '#formRenameFile' );
|
var form = $( '#formRenameFile' );
|
||||||
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRename' ).on( 'click', function() {
|
form.find( '#buttonRename' ).on( 'click', function() {
|
||||||
@@ -1388,7 +1388,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showCopyMoveDialog = function( name ) {
|
this.showCopyMoveDialog = function( name ) {
|
||||||
self.showModal( self.templates.copymove );
|
self.showModal( Mustache.render( self.templates.copymove, { i18n: self.i18n } ) );
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: self.api,
|
url: self.api,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -1482,7 +1482,7 @@ function IFM( params ) {
|
|||||||
if( filename.lastIndexOf( '.' ) > 1 )
|
if( filename.lastIndexOf( '.' ) > 1 )
|
||||||
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
||||||
else targetDirSuggestion = filename;
|
else targetDirSuggestion = filename;
|
||||||
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion } ) );
|
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion, i18n: self.i18n } ) );
|
||||||
var form = $('#formExtractFile');
|
var form = $('#formExtractFile');
|
||||||
form.find('#buttonExtract').on( 'click', function() {
|
form.find('#buttonExtract').on( 'click', function() {
|
||||||
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
||||||
@@ -1531,7 +1531,7 @@ function IFM( params ) {
|
|||||||
* Shows the upload file dialog
|
* Shows the upload file dialog
|
||||||
*/
|
*/
|
||||||
this.showUploadFileDialog = function() {
|
this.showUploadFileDialog = function() {
|
||||||
self.showModal( self.templates.uploadfile );
|
self.showModal( Mustache.render( self.templates.uploadfile, { i18n: self.i18n } ) );
|
||||||
var form = $('#formUploadFile');
|
var form = $('#formUploadFile');
|
||||||
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
||||||
@@ -1628,7 +1628,7 @@ function IFM( params ) {
|
|||||||
* Show the remote upload dialog
|
* Show the remote upload dialog
|
||||||
*/
|
*/
|
||||||
this.showRemoteUploadDialog = function() {
|
this.showRemoteUploadDialog = function() {
|
||||||
self.showModal( self.templates.remoteupload );
|
self.showModal( Mustache.render( self.templates.remoteupload, { i18n: self.i18n } ) );
|
||||||
var form = $('#formRemoteUpload');
|
var form = $('#formRemoteUpload');
|
||||||
form.find( '#url' )
|
form.find( '#url' )
|
||||||
.on( 'keypress', self.preventEnter )
|
.on( 'keypress', self.preventEnter )
|
||||||
@@ -1682,7 +1682,7 @@ function IFM( params ) {
|
|||||||
* Shows the ajax request dialog
|
* Shows the ajax request dialog
|
||||||
*/
|
*/
|
||||||
this.showAjaxRequestDialog = function() {
|
this.showAjaxRequestDialog = function() {
|
||||||
self.showModal( self.templates.ajaxrequest );
|
self.showModal( Mustache.render( self.templates.ajaxrequest, { i18n: self.i18n } ) );
|
||||||
var form = $('#formAjaxRequest');
|
var form = $('#formAjaxRequest');
|
||||||
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRequest' ).on( 'click', function() {
|
form.find( '#buttonRequest' ).on( 'click', function() {
|
||||||
@@ -1713,7 +1713,7 @@ function IFM( params ) {
|
|||||||
* Shows the delete dialog for multiple files
|
* Shows the delete dialog for multiple files
|
||||||
*/
|
*/
|
||||||
this.showMultiDeleteDialog = function() {
|
this.showMultiDeleteDialog = function() {
|
||||||
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length } ) );
|
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length, i18n: self.i18n } ) );
|
||||||
var form = $('#formDeleteFiles');
|
var form = $('#formDeleteFiles');
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.multiDelete();
|
self.multiDelete();
|
||||||
|
20
ifm.php
20
ifm.php
@@ -1146,7 +1146,7 @@ function IFM( params ) {
|
|||||||
this.showFileDialog = function () {
|
this.showFileDialog = function () {
|
||||||
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
||||||
var content = arguments.length > 1 ? arguments[1] : "";
|
var content = arguments.length > 1 ? arguments[1] : "";
|
||||||
self.showModal( Mustache.render( self.templates.file, { filename: filename } ), { large: true } );
|
self.showModal( Mustache.render( self.templates.file, { filename: filename, i18n: self.i18n } ), { large: true } );
|
||||||
var form = $('#formFile');
|
var form = $('#formFile');
|
||||||
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
||||||
form.find('#buttonSave').on( 'click', function() {
|
form.find('#buttonSave').on( 'click', function() {
|
||||||
@@ -1251,7 +1251,7 @@ function IFM( params ) {
|
|||||||
* Shows the create directory dialog
|
* Shows the create directory dialog
|
||||||
*/
|
*/
|
||||||
this.showCreateDirDialog = function() {
|
this.showCreateDirDialog = function() {
|
||||||
self.showModal( self.templates.createdir );
|
self.showModal( Mustache.render( self.templates.createdir, { i18n: self.i18n } ) );
|
||||||
var form = $( '#formCreateDir' );
|
var form = $( '#formCreateDir' );
|
||||||
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonSave' ).on( 'click', function() {
|
form.find( '#buttonSave' ).on( 'click', function() {
|
||||||
@@ -1298,7 +1298,7 @@ function IFM( params ) {
|
|||||||
* @param string name - name of the file
|
* @param string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showDeleteFileDialog = function( filename ) {
|
this.showDeleteFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.deletefile, { filename: name } ) );
|
self.showModal( Mustache.render( self.templates.deletefile, { filename: name, i18n: self.i18n } ) );
|
||||||
var form = $( '#formDeleteFile' );
|
var form = $( '#formDeleteFile' );
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.deleteFile( filename );
|
self.deleteFile( filename );
|
||||||
@@ -1342,7 +1342,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showRenameFileDialog = function( filename ) {
|
this.showRenameFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename } ) );
|
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename, i18n: self.i18n } ) );
|
||||||
var form = $( '#formRenameFile' );
|
var form = $( '#formRenameFile' );
|
||||||
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRename' ).on( 'click', function() {
|
form.find( '#buttonRename' ).on( 'click', function() {
|
||||||
@@ -1388,7 +1388,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showCopyMoveDialog = function( name ) {
|
this.showCopyMoveDialog = function( name ) {
|
||||||
self.showModal( self.templates.copymove );
|
self.showModal( Mustache.render( self.templates.copymove, { i18n: self.i18n } ) );
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: self.api,
|
url: self.api,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -1482,7 +1482,7 @@ function IFM( params ) {
|
|||||||
if( filename.lastIndexOf( '.' ) > 1 )
|
if( filename.lastIndexOf( '.' ) > 1 )
|
||||||
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
||||||
else targetDirSuggestion = filename;
|
else targetDirSuggestion = filename;
|
||||||
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion } ) );
|
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion, i18n: self.i18n } ) );
|
||||||
var form = $('#formExtractFile');
|
var form = $('#formExtractFile');
|
||||||
form.find('#buttonExtract').on( 'click', function() {
|
form.find('#buttonExtract').on( 'click', function() {
|
||||||
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
||||||
@@ -1531,7 +1531,7 @@ function IFM( params ) {
|
|||||||
* Shows the upload file dialog
|
* Shows the upload file dialog
|
||||||
*/
|
*/
|
||||||
this.showUploadFileDialog = function() {
|
this.showUploadFileDialog = function() {
|
||||||
self.showModal( self.templates.uploadfile );
|
self.showModal( Mustache.render( self.templates.uploadfile, { i18n: self.i18n } ) );
|
||||||
var form = $('#formUploadFile');
|
var form = $('#formUploadFile');
|
||||||
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
||||||
@@ -1628,7 +1628,7 @@ function IFM( params ) {
|
|||||||
* Show the remote upload dialog
|
* Show the remote upload dialog
|
||||||
*/
|
*/
|
||||||
this.showRemoteUploadDialog = function() {
|
this.showRemoteUploadDialog = function() {
|
||||||
self.showModal( self.templates.remoteupload );
|
self.showModal( Mustache.render( self.templates.remoteupload, { i18n: self.i18n } ) );
|
||||||
var form = $('#formRemoteUpload');
|
var form = $('#formRemoteUpload');
|
||||||
form.find( '#url' )
|
form.find( '#url' )
|
||||||
.on( 'keypress', self.preventEnter )
|
.on( 'keypress', self.preventEnter )
|
||||||
@@ -1682,7 +1682,7 @@ function IFM( params ) {
|
|||||||
* Shows the ajax request dialog
|
* Shows the ajax request dialog
|
||||||
*/
|
*/
|
||||||
this.showAjaxRequestDialog = function() {
|
this.showAjaxRequestDialog = function() {
|
||||||
self.showModal( self.templates.ajaxrequest );
|
self.showModal( Mustache.render( self.templates.ajaxrequest, { i18n: self.i18n } ) );
|
||||||
var form = $('#formAjaxRequest');
|
var form = $('#formAjaxRequest');
|
||||||
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRequest' ).on( 'click', function() {
|
form.find( '#buttonRequest' ).on( 'click', function() {
|
||||||
@@ -1713,7 +1713,7 @@ function IFM( params ) {
|
|||||||
* Shows the delete dialog for multiple files
|
* Shows the delete dialog for multiple files
|
||||||
*/
|
*/
|
||||||
this.showMultiDeleteDialog = function() {
|
this.showMultiDeleteDialog = function() {
|
||||||
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length } ) );
|
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length, i18n: self.i18n } ) );
|
||||||
var form = $('#formDeleteFiles');
|
var form = $('#formDeleteFiles');
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.multiDelete();
|
self.multiDelete();
|
||||||
|
20
src/ifm.js
20
src/ifm.js
@@ -264,7 +264,7 @@ function IFM( params ) {
|
|||||||
this.showFileDialog = function () {
|
this.showFileDialog = function () {
|
||||||
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
var filename = arguments.length > 0 ? arguments[0] : "newfile.txt";
|
||||||
var content = arguments.length > 1 ? arguments[1] : "";
|
var content = arguments.length > 1 ? arguments[1] : "";
|
||||||
self.showModal( Mustache.render( self.templates.file, { filename: filename } ), { large: true } );
|
self.showModal( Mustache.render( self.templates.file, { filename: filename, i18n: self.i18n } ), { large: true } );
|
||||||
var form = $('#formFile');
|
var form = $('#formFile');
|
||||||
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
form.find('input[name="filename"]').on( 'keypress', self.preventEnter );
|
||||||
form.find('#buttonSave').on( 'click', function() {
|
form.find('#buttonSave').on( 'click', function() {
|
||||||
@@ -369,7 +369,7 @@ function IFM( params ) {
|
|||||||
* Shows the create directory dialog
|
* Shows the create directory dialog
|
||||||
*/
|
*/
|
||||||
this.showCreateDirDialog = function() {
|
this.showCreateDirDialog = function() {
|
||||||
self.showModal( self.templates.createdir );
|
self.showModal( Mustache.render( self.templates.createdir, { i18n: self.i18n } ) );
|
||||||
var form = $( '#formCreateDir' );
|
var form = $( '#formCreateDir' );
|
||||||
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=dirname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonSave' ).on( 'click', function() {
|
form.find( '#buttonSave' ).on( 'click', function() {
|
||||||
@@ -416,7 +416,7 @@ function IFM( params ) {
|
|||||||
* @param string name - name of the file
|
* @param string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showDeleteFileDialog = function( filename ) {
|
this.showDeleteFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.deletefile, { filename: name } ) );
|
self.showModal( Mustache.render( self.templates.deletefile, { filename: name, i18n: self.i18n } ) );
|
||||||
var form = $( '#formDeleteFile' );
|
var form = $( '#formDeleteFile' );
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.deleteFile( filename );
|
self.deleteFile( filename );
|
||||||
@@ -460,7 +460,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showRenameFileDialog = function( filename ) {
|
this.showRenameFileDialog = function( filename ) {
|
||||||
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename } ) );
|
self.showModal( Mustache.render( self.templates.renamefile, { filename: filename, i18n: self.i18n } ) );
|
||||||
var form = $( '#formRenameFile' );
|
var form = $( '#formRenameFile' );
|
||||||
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newname]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRename' ).on( 'click', function() {
|
form.find( '#buttonRename' ).on( 'click', function() {
|
||||||
@@ -506,7 +506,7 @@ function IFM( params ) {
|
|||||||
* @params string name - name of the file
|
* @params string name - name of the file
|
||||||
*/
|
*/
|
||||||
this.showCopyMoveDialog = function( name ) {
|
this.showCopyMoveDialog = function( name ) {
|
||||||
self.showModal( self.templates.copymove );
|
self.showModal( Mustache.render( self.templates.copymove, { i18n: self.i18n } ) );
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: self.api,
|
url: self.api,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@@ -600,7 +600,7 @@ function IFM( params ) {
|
|||||||
if( filename.lastIndexOf( '.' ) > 1 )
|
if( filename.lastIndexOf( '.' ) > 1 )
|
||||||
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
targetDirSuggestion = filename.substr( 0, filename.lastIndexOf( '.' ) );
|
||||||
else targetDirSuggestion = filename;
|
else targetDirSuggestion = filename;
|
||||||
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion } ) );
|
self.showModal( Mustache.render( self.templates.extractfile, { filename: filename, destination: targetDirSuggestion, i18n: self.i18n } ) );
|
||||||
var form = $('#formExtractFile');
|
var form = $('#formExtractFile');
|
||||||
form.find('#buttonExtract').on( 'click', function() {
|
form.find('#buttonExtract').on( 'click', function() {
|
||||||
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
var t = form.find('input[name=extractTargetLocation]:checked').val();
|
||||||
@@ -649,7 +649,7 @@ function IFM( params ) {
|
|||||||
* Shows the upload file dialog
|
* Shows the upload file dialog
|
||||||
*/
|
*/
|
||||||
this.showUploadFileDialog = function() {
|
this.showUploadFileDialog = function() {
|
||||||
self.showModal( self.templates.uploadfile );
|
self.showModal( Mustache.render( self.templates.uploadfile, { i18n: self.i18n } ) );
|
||||||
var form = $('#formUploadFile');
|
var form = $('#formUploadFile');
|
||||||
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
form.find( 'input[name=newfilename]' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
form.find( 'input[name=files]' ).on( 'change', function( e ) {
|
||||||
@@ -746,7 +746,7 @@ function IFM( params ) {
|
|||||||
* Show the remote upload dialog
|
* Show the remote upload dialog
|
||||||
*/
|
*/
|
||||||
this.showRemoteUploadDialog = function() {
|
this.showRemoteUploadDialog = function() {
|
||||||
self.showModal( self.templates.remoteupload );
|
self.showModal( Mustache.render( self.templates.remoteupload, { i18n: self.i18n } ) );
|
||||||
var form = $('#formRemoteUpload');
|
var form = $('#formRemoteUpload');
|
||||||
form.find( '#url' )
|
form.find( '#url' )
|
||||||
.on( 'keypress', self.preventEnter )
|
.on( 'keypress', self.preventEnter )
|
||||||
@@ -800,7 +800,7 @@ function IFM( params ) {
|
|||||||
* Shows the ajax request dialog
|
* Shows the ajax request dialog
|
||||||
*/
|
*/
|
||||||
this.showAjaxRequestDialog = function() {
|
this.showAjaxRequestDialog = function() {
|
||||||
self.showModal( self.templates.ajaxrequest );
|
self.showModal( Mustache.render( self.templates.ajaxrequest, { i18n: self.i18n } ) );
|
||||||
var form = $('#formAjaxRequest');
|
var form = $('#formAjaxRequest');
|
||||||
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
form.find( '#ajaxurl' ).on( 'keypress', self.preventEnter );
|
||||||
form.find( '#buttonRequest' ).on( 'click', function() {
|
form.find( '#buttonRequest' ).on( 'click', function() {
|
||||||
@@ -831,7 +831,7 @@ function IFM( params ) {
|
|||||||
* Shows the delete dialog for multiple files
|
* Shows the delete dialog for multiple files
|
||||||
*/
|
*/
|
||||||
this.showMultiDeleteDialog = function() {
|
this.showMultiDeleteDialog = function() {
|
||||||
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length } ) );
|
self.showModal( Mustache.render( self.templates.multidelete, { count: $('#filetable tr.selectedItem').length, i18n: self.i18n } ) );
|
||||||
var form = $('#formDeleteFiles');
|
var form = $('#formDeleteFiles');
|
||||||
form.find( '#buttonYes' ).on( 'click', function() {
|
form.find( '#buttonYes' ).on( 'click', function() {
|
||||||
self.multiDelete();
|
self.multiDelete();
|
||||||
|
Reference in New Issue
Block a user