mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-13 19:44:02 +02:00
[=] Fix modal classes
This commit is contained in:
22
compiler.php
22
compiler.php
@@ -11,9 +11,10 @@ chdir( realpath( dirname( __FILE__ ) ) );
|
|||||||
// output files and common attrs
|
// output files and common attrs
|
||||||
define( "IFM_CDN", true );
|
define( "IFM_CDN", true );
|
||||||
define( "IFM_VERSION", "<a href='https://github.com/cryol/ifm/tree/2.6.0' target=_blank>v2.6.0</a>" );
|
define( "IFM_VERSION", "<a href='https://github.com/cryol/ifm/tree/2.6.0' target=_blank>v2.6.0</a>" );
|
||||||
define( "IFM_STANDALONE", "dist/ifm.php" );
|
define( "IFM_RELEASE_DIR", "dist/");
|
||||||
define( "IFM_STANDALONE_GZ", "dist/ifm.min.php" );
|
define( "IFM_STANDALONE", "ifm.php" );
|
||||||
define( "IFM_LIB", "dist/libifm.php" );
|
define( "IFM_STANDALONE_GZ", "ifm.min.php" );
|
||||||
|
define( "IFM_LIB", "libifm.php" );
|
||||||
|
|
||||||
if( IFM_CDN ){
|
if( IFM_CDN ){
|
||||||
$IFM_ASSETS = "src/assets.cdn.part";
|
$IFM_ASSETS = "src/assets.cdn.part";
|
||||||
@@ -56,6 +57,7 @@ foreach( $IFM_SRC_PHP as $phpfile ) {
|
|||||||
$compiled = array_merge( $compiled, $lines );
|
$compiled = array_merge( $compiled, $lines );
|
||||||
}
|
}
|
||||||
$compiled = join( $compiled );
|
$compiled = join( $compiled );
|
||||||
|
|
||||||
$compiled = str_replace( "IFM_ASSETS", file_get_contents( $IFM_ASSETS ), $compiled );
|
$compiled = str_replace( "IFM_ASSETS", file_get_contents( $IFM_ASSETS ), $compiled );
|
||||||
/**
|
/**
|
||||||
* Process file includes
|
* Process file includes
|
||||||
@@ -92,13 +94,13 @@ foreach( $includes as $var )
|
|||||||
|
|
||||||
$compiled = str_replace( 'IFM_VERSION', IFM_VERSION, $compiled );
|
$compiled = str_replace( 'IFM_VERSION', IFM_VERSION, $compiled );
|
||||||
|
|
||||||
if (!is_dir('dist/')){
|
if (!is_dir(IFM_RELEASE_DIR)){
|
||||||
mkdir('dist');
|
mkdir(IFM_RELEASE_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// build standalone ifm
|
// build standalone ifm
|
||||||
file_put_contents( IFM_STANDALONE, $compiled );
|
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE, $compiled );
|
||||||
file_put_contents( IFM_STANDALONE, '
|
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE, '
|
||||||
/**
|
/**
|
||||||
* start IFM
|
* start IFM
|
||||||
*/
|
*/
|
||||||
@@ -108,9 +110,9 @@ $ifm->run();
|
|||||||
|
|
||||||
// build compressed ifm
|
// build compressed ifm
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
IFM_STANDALONE_GZ,
|
IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE_GZ,
|
||||||
'<?php eval( gzdecode( file_get_contents( __FILE__, false, null, 85 ) ) ); exit(0); ?>'
|
'<?php eval( gzdecode( file_get_contents( __FILE__, false, null, 85 ) ) ); exit(0); ?>'
|
||||||
. gzencode( file_get_contents( "./dist/ifm.php", false, null, 5 ) )
|
. gzencode( file_get_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') .IFM_STANDALONE, false, null, 5 ) )
|
||||||
);
|
);
|
||||||
// build lib
|
// build lib
|
||||||
file_put_contents( IFM_LIB, $compiled );
|
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_LIB, $compiled );
|
||||||
|
10
src/ifm.js
10
src/ifm.js
@@ -33,7 +33,7 @@ function IFM(params) {
|
|||||||
this.showModal = function( content, options ) {
|
this.showModal = function( content, options ) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
var modal = document.createElement( 'div' );
|
var modal = document.createElement( 'div' );
|
||||||
modal.classList.add( 'modal' );
|
modal.classList.add( 'modal', 'fade' );
|
||||||
modal.id = 'ifmmodal';
|
modal.id = 'ifmmodal';
|
||||||
modal.attributes.role = 'dialog';
|
modal.attributes.role = 'dialog';
|
||||||
var modalDialog = document.createElement( 'div' );
|
var modalDialog = document.createElement( 'div' );
|
||||||
@@ -45,7 +45,6 @@ function IFM(params) {
|
|||||||
modalContent.innerHTML = content;
|
modalContent.innerHTML = content;
|
||||||
modalDialog.appendChild( modalContent );
|
modalDialog.appendChild( modalContent );
|
||||||
modal.appendChild( modalDialog );
|
modal.appendChild( modalDialog );
|
||||||
console.log(modal);
|
|
||||||
document.body.appendChild( modal );
|
document.body.appendChild( modal );
|
||||||
|
|
||||||
// For this we have to use jquery, because bootstrap modals depend on them. Also the bs.modal
|
// For this we have to use jquery, because bootstrap modals depend on them. Also the bs.modal
|
||||||
@@ -481,8 +480,8 @@ function IFM(params) {
|
|||||||
title: self.i18n.options,
|
title: self.i18n.options,
|
||||||
content: function() {
|
content: function() {
|
||||||
// see https://github.com/twbs/bootstrap/issues/12571
|
// see https://github.com/twbs/bootstrap/issues/12571
|
||||||
var ihatethisfuckingpopoverworkaround = $('#editoroptions').data('bs.popover');
|
// var ihatethisfuckingpopoverworkaround = $('#editoroptions').data('bs.popover');
|
||||||
ihatethisfuckingpopoverworkaround.$tip.find( '.popover-content' ).empty();
|
// $(ihatethisfuckingpopoverworkaround.tip).find( '.popover-body' ).empty();
|
||||||
|
|
||||||
var aceSession = self.editor.getSession();
|
var aceSession = self.editor.getSession();
|
||||||
var content = self.getNodesFromString(
|
var content = self.getNodesFromString(
|
||||||
@@ -521,7 +520,8 @@ function IFM(params) {
|
|||||||
self.editor.getSession().setMode( e.target.value );
|
self.editor.getSession().setMode( e.target.value );
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return content;
|
|
||||||
|
return $(content);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
7
src/includes/bootstrap.min.css
vendored
7
src/includes/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -125,3 +125,22 @@ table.dataTable thead th.sorting_desc:after {
|
|||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
.modal-dialog {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 1.75rem auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.modal-lg, .modal-xl {
|
||||||
|
max-width: 800px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
@@ -8,7 +8,7 @@
|
|||||||
<label>{{i18n.method}}</label><br>
|
<label>{{i18n.method}}</label><br>
|
||||||
<input type="radio" name="arMethod" value="GET">GET</input><input type="radio" name="arMethod" value="POST" checked="checked">POST</input><br>
|
<input type="radio" name="arMethod" value="GET">GET</input><input type="radio" name="arMethod" value="POST" checked="checked">POST</input><br>
|
||||||
<button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button>
|
<button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonClose">{{i18n.cancel}}</button><br>
|
<button type="button" class="btn btn-secondary" id="buttonClose">{{i18n.cancel}}</button><br>
|
||||||
<label>{{i18n.response}}</label><br>
|
<label>{{i18n.response}}</label><br>
|
||||||
<textarea class="form-control" id="ajaxresponse"></textarea>
|
<textarea class="form-control" id="ajaxresponse"></textarea>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div>
|
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="copyButton">{{i18n.copy}}</button>
|
<button type="button" class="btn btn-secondary" id="copyButton">{{i18n.copy}}</button>
|
||||||
<button type="button" class="btn btn-default" id="moveButton">{{i18n.move}}</button>
|
<button type="button" class="btn btn-secondary" id="moveButton">{{i18n.move}}</button>
|
||||||
<button type="button" class="btn btn-default" id="cancelButton">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="cancelButton">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="buttonSave">{{i18n.save}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="buttonSave">{{i18n.save}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -9,6 +9,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-danger" id="buttonYes">{{i18n.delete}}</button>
|
<button type="button" class="btn btn-danger" id="buttonYes">{{i18n.delete}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonNo">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonNo">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="buttonExtract">{{i18n.extract}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonExtract">{{i18n.extract}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -4,12 +4,12 @@
|
|||||||
<label>{{i18n.filename}}:</label>
|
<label>{{i18n.filename}}:</label>
|
||||||
<input type="text" class="form-control" name="filename" value="{{filename}}"><br>
|
<input type="text" class="form-control" name="filename" value="{{filename}}"><br>
|
||||||
<div id="content" name="content"></div><br>
|
<div id="content" name="content"></div><br>
|
||||||
<button type="button" class="btn btn-default" id="editoroptions">{{i18n.editor_options}}</button>
|
<button type="button" class="btn btn-secondary" id="editoroptions">{{i18n.editor_options}}</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="buttonSave" class="btn btn-default">{{i18n.save}}</button>
|
<button type="button" id="buttonSave" class="btn btn-secondary">{{i18n.save}}</button>
|
||||||
<button type="button" id="buttonSaveNotClose" class="btn btn-default">{{i18n.save_wo_close}}</button>
|
<button type="button" id="buttonSaveNotClose" class="btn btn-secondary">{{i18n.save_wo_close}}</button>
|
||||||
<button type="button" id="buttonClose" class="btn btn-default">{{i18n.close}}</button>
|
<button type="button" id="buttonClose" class="btn btn-secondary">{{i18n.close}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -1,14 +1,21 @@
|
|||||||
<input type="checkbox" id="editor-wordwrap"
|
<div class="form-check p-0">
|
||||||
{{#wordwrap}}
|
<input type="checkbox" id="editor-wordwrap"
|
||||||
checked="checked"
|
{{#wordwrap}}
|
||||||
{{/wordwrap}}
|
checked="checked"
|
||||||
> {{i18n.word_wrap}}</input><br>
|
{{/wordwrap}}
|
||||||
<input type="checkbox" id="editor-softtabs"
|
>
|
||||||
{{#softtabs}}
|
<label class="form-check-label" for="editor-wordwrap">{{i18n.word_wrap}}</label>
|
||||||
checked="checked"
|
</div>
|
||||||
{{/softtabs}}
|
<div class="form-check">
|
||||||
> {{i18n.soft_tabs}}</input>
|
<input class="form-check-input" type="checkbox" id="editor-softtabs"
|
||||||
<div class="input-group"><span class="input-group-addon">{{i18n.tab_size}}</span><input class="form-control" type="text" size="2" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}"></div>
|
{{#softtabs}}
|
||||||
|
checked="checked"
|
||||||
|
{{/softtabs}}
|
||||||
|
>
|
||||||
|
<label class="form-check-label" for="editor-softtabs">{{i18n.soft_tabs}}</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend"><span class="input-group-text">{{i18n.tab_size}}</span></div><input class="form-control" type="text" size="2" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}"></div>
|
||||||
{{#ace_includes}}
|
{{#ace_includes}}
|
||||||
<select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax">
|
<select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax">
|
||||||
{{#modes}}
|
{{#modes}}
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="buttonUpload">{{i18n.upload}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" id="buttonRename">{{i18n.file_rename}}</button>
|
<button type="button" class="btn btn-secondary" id="buttonRename">{{i18n.file_rename}}</button>
|
||||||
<button type="button" class="btn btn-default" id="buttonCancel">{{i18n.cancel}} </button>
|
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}} </button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -2,13 +2,13 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label>{{i18n.upload_file}}</label><br>
|
<label>{{i18n.upload_file}}</label><br>
|
||||||
<input class="file" type="file" name="files" multiple><br>
|
<input class="form-control-file" type="file" name="files" multiple><br>
|
||||||
<label>{{i18n.filename_new}}</label>
|
<label>{{i18n.filename_new}}</label>
|
||||||
<input class="form-control" type="text" name="newfilename"><br>
|
<input class="form-control" type="text" name="newfilename"><br>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="btn btn-default" id="buttonUpload">{{i18n.upload}}</button>
|
<button class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button>
|
||||||
<button class="btn btn-default" id="buttonCancel">{{i18n.cancel}}</button>
|
<button class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Reference in New Issue
Block a user