Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using modal dialog for adding objects
- Loading branch information
Dr. Frank Hoffmann
authored and
Dr. Frank Hoffmann
committed
Jun 16, 2018
1 parent
21d99b9
commit a7bd483
Showing
8 changed files
with
151 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,4 @@ | ||
<dtml-unless "REQUEST.get('zmi_dialog','window')=='modal'"> | ||
</body> | ||
<script> | ||
// Wrap form element with fluid-container if missing | ||
$(function() { | ||
if ( $('main.container-fluid').length==0 ) { | ||
$('body>form,body>p').wrap('<main class="container-fluid"></main>'); | ||
} | ||
}); | ||
|
||
// QUICKFIX OBJECT ICONS (as long as not set systematically in the class definitions) | ||
var zmi_icons = { | ||
"User Folder":{ "title":"Access Control List", "class":"fa fa-user-friends" }, | ||
"UserFolder":{ "title":"Access Control List", "class":"fa fa-user-friends" }, | ||
"PluggableAuthService":{ "title":"Pluggable Auth Service", "class":"fa fa-users-cog" }, | ||
"User":{ "title":"User", "class":"fa fa-user" }, | ||
"TemporaryFolder":{ "title":"Folder", "class":"far fa-folder" }, | ||
"Filesystem Directory View":{ "title":"Filesystem Directory View", "class":"far fa-folder-open" }, | ||
"Ordered":{ "title":"Folder (Ordered)", "class":"far fa-folder zmi-icon-folder-ordered" }, | ||
"Folder":{ "title":"Folder", "class":"far fa-folder" }, | ||
"Script":{ "title":"Script (Python)", "class":"fa fa-terminal" }, | ||
"ExternalMethod":{ "title":"External Python Method", "class":"fa fa-external-link-square" }, | ||
"DTML Document":{ "title":"DTML Document", "class":"far fa-file-alt" }, | ||
"DTML Method":{ "title":"DTML Document", "class":"far fa-file-alt" }, | ||
"Page Template":{ "title":"Page Template", "class":"far fa-file-code" }, | ||
"File":{ "title":"File Object", "class":"far fa-file-archive" }, | ||
"Mail":{ "title":"Mail Folder", "class":"far fa-envelope" }, | ||
"Image":{ "title":"Image", "class":"far fa-file-image" }, | ||
"Control":{ "title":"Control Panel", "class":"fa fa-cogs" }, | ||
"Database":{ "title":"Database", "class":"far fa-database" }, | ||
"ZSQLiteDA":{ "title":"Database", "class":"far fa-database" }, | ||
"ZMySQLDA":{ "title":"MySQL-Database Adapter", "class":"far fa-database" }, | ||
"Product":{ "title":"Installed Product", "class":"fa fa-gift" }, | ||
"ZSQL":{ "title":"ZSQL-Method", "class":"far fa-puzzle-piece" }, | ||
"Debug Manager":{ "title":"Debug Manager", "class":"fas fa-bug" }, | ||
"Site Error Log":{ "title":"Site Error Log", "class":"fas fa-bug" }, | ||
"Browser Id Manager":{ "title":"Browser Id Manager", "class":"far fa-id-card" }, | ||
"ZMS":{ "title":"ZMS Root", "class":"fas fa-home" }, | ||
"ZMSObject.png":{ "title":"ZMS Content", "class":"far fa-file" }, | ||
"Monster":{ "title":"Virtual Host Monster", "class":"fa fa-code-branch" }, | ||
"ZCatalog":{ "title":"ZCatalog", "class":"far fa-search" }, | ||
"Session Data Manager":{ "title":"Session Data Manager", "class":"fas fa-history" }, | ||
"Cookie Crumbler":{ "title":"Cookie Crumbler", "class":"far fa-user-circle" }, | ||
"Broken object":{ "title":"Broken object", "class":"fas fa-ban text-danger" } | ||
} | ||
|
||
// EXECUTE: Process ZMI Icons | ||
for ( i in zmi_icons ) { | ||
var i_name = i; | ||
var i_title =zmi_icons[i].title; | ||
var i_class =zmi_icons[i].class; | ||
if ( $('i[title*="'+i_name+'"]').hasClass('icon-broken') ) { | ||
i_class += ' zmi-icon-broken' | ||
}; | ||
$('i[title*="'+i_name+'"]').replaceWith('<i data-title="'+i_title+'" class="'+i_class+'"></i>'); | ||
} | ||
|
||
|
||
// OTHER ICONS | ||
$('i[title*="/p_/pl"]').replaceWith('<i data-title="Expand..." class="far fa-plus-square"></i>'); | ||
$('i[title*="/p_/mi"]').replaceWith('<i data-title="Collapse..." class="far fa-minus-square"></i>'); | ||
$('i[title*="/p_/davlocked"]').replaceWith('<i data-title="WebDAV" class="fa fa-retweet"></i>'); | ||
$('img[src*="misc_"]').replaceWith('<i class="fa fa-circle-blank"></i>'); | ||
$('img[src*="zms_"]').replaceWith('<i class="fa fa-circle-blank"></i>'); | ||
|
||
$('#menu_tree td[width="16"] a:contains("+")').html(('<i title="Expand..." class="fas fa-caret-right text-muted"></i>')); | ||
$('#menu_tree td[width="16"] a:contains("-")').html(('<i title="Collapse..." class="fas fa-caret-down text-muted"></i>')); | ||
|
||
// SHOW SOME MENUS ONLY ON LIST PAGES AS ACTIVE | ||
if ($('.nav a[href="manage_findForm"]').length > 0 ) { | ||
$('#addItemSelect, #toggle_menu').css('opacity',1); | ||
$('#addItemSelect').removeAttr('disabled'); | ||
$('#addItemSelect').attr( 'title', $('#addItemSelect').attr('data-title-active') ); | ||
$('#toggle_menu').attr( 'title', $('#toggle_menu').attr('data-title-active') ); | ||
} else { | ||
$('#addItemSelect, #toggle_menu').css('opacity',.5); | ||
$('#addItemSelect').attr('disabled','disabled'); | ||
$('#addItemSelect').attr( 'title', $('#addItemSelect').attr('data-title-inactive') ); | ||
$('#toggle_menu').attr( 'title', $('#toggle_menu').attr('data-title-inactive') ); | ||
} | ||
|
||
// HELP ICON | ||
$('a[href*="HelpSys"]').empty() | ||
.append('<i class="fa fa-question-sign"></i>') | ||
.css('border-color','transparent'); | ||
|
||
</script> | ||
</html> | ||
</dtml-unless> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.