mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-11 10:34:00 +02:00
Merge pull request #1 from misterunknown/i18n
render all modals via mustache
This commit is contained in:
@@ -1078,7 +1078,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() {
|
||||||
@@ -1183,7 +1183,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() {
|
||||||
@@ -1230,7 +1230,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 );
|
||||||
@@ -1274,7 +1274,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() {
|
||||||
@@ -1320,7 +1320,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",
|
||||||
@@ -1414,7 +1414,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();
|
||||||
@@ -1463,7 +1463,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 ) {
|
||||||
@@ -1560,7 +1560,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 )
|
||||||
@@ -1614,7 +1614,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() {
|
||||||
@@ -1645,7 +1645,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
@@ -1078,7 +1078,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() {
|
||||||
@@ -1183,7 +1183,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() {
|
||||||
@@ -1230,7 +1230,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 );
|
||||||
@@ -1274,7 +1274,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() {
|
||||||
@@ -1320,7 +1320,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",
|
||||||
@@ -1414,7 +1414,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();
|
||||||
@@ -1463,7 +1463,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 ) {
|
||||||
@@ -1560,7 +1560,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 )
|
||||||
@@ -1614,7 +1614,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() {
|
||||||
@@ -1645,7 +1645,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
@@ -239,7 +239,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() {
|
||||||
@@ -344,7 +344,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() {
|
||||||
@@ -391,7 +391,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 );
|
||||||
@@ -435,7 +435,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() {
|
||||||
@@ -481,7 +481,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",
|
||||||
@@ -575,7 +575,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();
|
||||||
@@ -624,7 +624,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 ) {
|
||||||
@@ -721,7 +721,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 )
|
||||||
@@ -775,7 +775,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() {
|
||||||
@@ -806,7 +806,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