Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Quicker start
Browse files Browse the repository at this point in the history
Customize dialogbox with a className.
  • Loading branch information
cdujeu committed Nov 3, 2013
1 parent 66b64af commit d0e6b57
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 41 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -290,11 +290,11 @@ Class.create("AjxpBootstrap", {
boxImage : window.ajxpResourcesFolder+'/images/progress_box.gif', // boxImage : image around the progress bar
barImage : window.ajxpResourcesFolder+'/images/progress_bar.gif', // Image to use in the progressbar. Can be an array of images too.
height : 11, // Height of the progressbar - don't forget to adjust your image too!!!
onTick : function(pbObj) {
if(pbObj.getPercentage() == 100){
onTick : function(pbObj) {
if(pbObj.getPercentage() >= 80){
new Effect.Parallel([
new Effect.Opacity($('loader_round_progress'),{sync:true,from:1,to:0,duration:0.4}),
new Effect.Opacity($('loader_dialog_footer'),{sync:true,from:1,to:0,duration:0.4})
new Effect.Opacity($('loader_round_progress'),{sync:true,from:1,to:0,duration:0.6}),
new Effect.Opacity($('loader_dialog_footer'),{sync:true,from:1,to:0,duration:0.6})
],
{afterFinish : function(){
$('loading_overlay').remove();
Expand Down
19 changes: 10 additions & 9 deletions core/src/plugins/gui.ajax/res/js/ajaxplorer/class.Modal.js
Expand Up @@ -48,8 +48,8 @@ Class.create("Modal", {
initForms: function(){
this.elementName = 'generic_dialog_box';
this.htmlElement = $(this.elementName);
this.dialogTitle = this.htmlElement.select(".dialogTitle")[0];
this.dialogContent = this.htmlElement.select(".dialogContent")[0];
this.dialogTitle = this.htmlElement.down(".dialogTitle");
this.dialogContent = this.htmlElement.down(".dialogContent");
this.currentForm;
this.cachedForms = new Hash();
this.iframeIndex = 0;
Expand Down Expand Up @@ -101,7 +101,7 @@ Class.create("Modal", {
*/
showDialogForm: function(sTitle, sFormId, fOnLoad, fOnComplete, fOnCancel, bOkButtonOnly, skipButtons, useNextButtons){
this.clearContent(this.dialogContent);
//this.dialogTitle.innerHTML = sTitle;
this.htmlElement.className = 'dialogBox form-'+sFormId;
var newForm;
if($(sFormId).tagName == 'FORM') // WE PASSED A PREFETCHED HIDDEN FORM
{
Expand All @@ -112,7 +112,7 @@ Class.create("Modal", {
{
var formDiv = $(sFormId);
//var formDiv = $('all_forms').select('[id="'+sFormId+'"]')[0];
var newForm = document.createElement('form');
newForm = document.createElement('form');
newForm.id = 'modal_action_form';
newForm.setAttribute('name','modal_action_form');
newForm.appendChild(formDiv.cloneNode(true));
Expand Down Expand Up @@ -173,7 +173,8 @@ Class.create("Modal", {
$(sFormId).getAttribute("box_height"),
null,
($(sFormId).getAttribute("box_resize") && $(sFormId).getAttribute("box_resize") == "true"),
overlayStyle
overlayStyle,
sFormId
);
if($(newForm).select(".dialogFocus").length)
{
Expand Down Expand Up @@ -218,7 +219,7 @@ Class.create("Modal", {
* @param boxHeight String Height in pixel or in percent
* @param skipShadow Boolean Do not add a shadow
*/
showContent: function(elementName, boxWidth, boxHeight, skipShadow, boxAutoResize, overlayStyle){
showContent: function(elementName, boxWidth, boxHeight, skipShadow, boxAutoResize, overlayStyle, formId){
ajaxplorer.disableShortcuts();
ajaxplorer.disableNavigation();
ajaxplorer.blurAll();
Expand Down Expand Up @@ -276,7 +277,7 @@ Class.create("Modal", {
Event.observe(window, "resize", this.currentResizeListener);
}

displayLightBoxById(elementName, overlayStyle);
displayLightBoxById(elementName, overlayStyle, (formId?'form-'+formId:null));

// FORCE ABSOLUTE FOR SAFARI
$(elementName).style.position = 'absolute';
Expand Down Expand Up @@ -656,11 +657,11 @@ Class.create("Modal", {
* Bootloader helper
* @param state Integer Current loading step
*/
updateLoadingProgress: function(state){
updateLoadingProgress: function(state){
this.loadingStep --;
var percent = (1 - (this.loadingStep / this.loadingStepsCount));
if(window.loaderProgress){
window.loaderProgress.setPercentage(parseInt(percent)*100, false);
window.loaderProgress.setPercentage(parseFloat(percent)*100, true);
}
if(state && $('progressState')){
$('progressState').update(state);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer_boot.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion core/src/plugins/gui.ajax/res/js/lib/leightbox/lightbox.js
Expand Up @@ -145,6 +145,11 @@ lightbox.prototype = {
this.originalStyle[key] = $('overlay').getStyle(key);
}
$('overlay').setStyle(this.overlayStyle);
}
if(this.overlayClass){
$('overlay').className = 'overlay '+this.overlayClass;
}else{
$('overlay').className = 'overlay';
}
}
if(this.content != null)
Expand Down Expand Up @@ -220,10 +225,11 @@ function initialize(){

}

function displayLightBoxById(id, overlayStyle)
function displayLightBoxById(id, overlayStyle, overlayClass)
{
valid = new lightbox(id);
if(overlayStyle) valid.overlayStyle = overlayStyle;
if(overlayClass) valid.overlayClass = overlayClass;
valid.activate();
currentLightBox = valid;
if(id != 'copymove_div')
Expand Down
Expand Up @@ -201,8 +201,8 @@ JS_BRAMUS.jsProgressBar = Class.create({
* -------------------------------------------------------------
*/
setPercentage : function(targetPercentage, clearQueue) {
if(!this.visualsInitialized){

if(!this.visualsInitialized){
this.initialPerc = targetPercentage;
this.initVisuals();
return;
Expand Down
52 changes: 33 additions & 19 deletions core/src/plugins/gui.ajax/res/themes/vision/css/ajaxplorer.css
Expand Up @@ -795,25 +795,6 @@ div.oneFieldForm input.SF_input{
/********************/
/* PROGRESS BAR */
/********************/
#progressBox
{
display: block;
z-index: 2002;
top: 20%;
-moz-border-radius : 5px;
border-radius : 5px;
width: 305px;
padding: 3px;
display: block;
top: 30%;
z-index: 2002;
left: 40%;
position: absolute;
-webkit-box-shadow: 5px 5px 60px #222;
-moz-box-shadow: 5px 5px 60px #222;
box-shadow: 5px 5px 60px #222;
}

.pg_cancel_button{
background-color: #C33;
display: inline-block;
Expand Down Expand Up @@ -4200,6 +4181,39 @@ div.dialogBox div.dialogBox.css_boxshadow{
border: 1px solid white;
}

div.dialogBox.form-login_form{
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
}

#progressBox
{
display: block;
z-index: 2002;
top: 20%;
-moz-border-radius : 5px;
border-radius : 5px;
width: 305px;
padding: 3px;
display: block;
top: 30%;
z-index: 2002;
left: 40%;
position: absolute;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
}

div.overlay.form-login_form,
div.overlay.form-switch_language_form
{
opacity: 1 !important;
background-image: url('../images/grid_t.png');
background-color: white !important;
}

/****************************************/
/* WEBDAV PREFERENCES */
/****************************************/
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/vision/css/allz.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/vision/html/gui.html
Expand Up @@ -24,7 +24,7 @@
</script>
<div id="ajxp_desktop" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"window","fitMarginBottom":"$(\"optional_bottom_div\").getHeight()"}'></div>
<div id="all_forms">
<div id="generic_dialog_box" class="dialogBox"><div class="dialogTitle"></div><div class="dialogContent"></div></div>
<div id="generic_dialog_box" class="dialogBox form-login_form"><div class="dialogTitle"></div><div class="dialogContent"></div></div>
<div id="hidden_frames" style="display:none;"></div>
<div id="hidden_forms" style="position:absolute;left:-1000px;"></div>

Expand Down
Expand Up @@ -43,7 +43,7 @@
}
?>
<div id="all_forms">
<div id="generic_dialog_box" class="dialogBox"><div class="dialogTitle"></div><div class="dialogContent"></div></div>
<div id="generic_dialog_box" class="dialogBox form-login_form"><div class="dialogTitle"></div><div class="dialogContent"></div></div>
<div id="hidden_frames" style="display:none;"></div>
<div id="hidden_forms" style="position:absolute;left:-1000px;"></div>

Expand Down

0 comments on commit d0e6b57

Please sign in to comment.