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

Commit

Permalink
Conf.sql:make sure to transform repository create options to integer,…
Browse files Browse the repository at this point in the history
… to avoid DB error

Ajxp_conf: resplit create ws and create tpl as two separate buttons, not a menu.
  • Loading branch information
cdujeu committed Dec 16, 2013
1 parent a303594 commit 1e55ab5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 35 deletions.
58 changes: 24 additions & 34 deletions core/src/plugins/access.ajxp_conf/ajxp_confActions.xml
Expand Up @@ -214,45 +214,13 @@
</processing>
</action>
<action name="create_repository">
<gui text="299" title="300" iconClass="icon-sitemap" src="hdd_external_unmount.png" accessKey="ajxp_conf.repository_access_key" hasAccessKey="false">
<gui text="ajxp_conf.90" title="300" iconClass="icon-sitemap" src="hdd_external_unmount.png" accessKey="ajxp_conf.repository_access_key" hasAccessKey="false">
<context selection="false" dir="false" recycle="hidden" behaviour="hidden" allowedMimes="workspaces_zone"
actionBar="true" contextMenu="false" infoPanel="false"
actionBarGroup="put" inZip="false">
</context>
</gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
<subMenu>
<dynamicBuilder><![CDATA[
var context = window.builderContext;
context.builderMenuItems = $A([]);
context.builderMenuItems.push({
name:MessageHash['ajxp_conf.90'],
alt:MessageHash[300],
isDefault : true,
icon_class:'icon-hdd',
image:resolveImageSource('images/actions/22/hdd_external_unmount.png', '', 22),
callback:function(e){
window.createRepoCmd = "repository";
this.options.src = 'hdd_external_unmount.png';
this.options.title = MessageHash[300];
this.apply();
}.bind(context)
} );
context.builderMenuItems.push({
name:MessageHash['ajxp_conf.91'],
alt:MessageHash['ajxp_conf.92'],
isDefault : false,
icon_class:'icon-th',
image:resolveImageSource('images/actions/22/hdd_external_mount.png', '', 22),
callback:function(e){
window.createRepoCmd = "template";
this.options.src = 'hdd_external_mount.png';
this.options.title = MessageHash['ajxp_conf.92'];
this.apply();
}.bind(context)
} );
]]></dynamicBuilder>
</subMenu>
<processing>
<clientCallback prepareModal="true"><![CDATA[
var loadFunc = function(oForm){
Expand All @@ -261,7 +229,7 @@
ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
}
ajaxplorer.actionBar.configEditor.setForm(oForm);
ajaxplorer.actionBar.configEditor.initCreateRepoWizard((window.createRepoCmd?window.createRepoCmd:'repository'));
ajaxplorer.actionBar.configEditor.initCreateRepoWizard('repository');
};
modal.showDialogForm('Create Repository', 'create_repository_box', loadFunc, null, null, false, true);
]]></clientCallback>
Expand Down Expand Up @@ -293,6 +261,28 @@
</serverCallback>
</processing>
</action>
<action name="create_repository_template">
<gui text="ajxp_conf.91" title="ajxp_conf.92" iconClass="icon-th" src="hdd_external_unmount.png" hasAccessKey="false">
<context selection="false" dir="false" recycle="hidden" behaviour="hidden" allowedMimes="workspaces_zone"
actionBar="true" contextMenu="false" infoPanel="false"
actionBarGroup="put" inZip="false">
</context>
</gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
<processing>
<clientCallback prepareModal="true"><![CDATA[
var loadFunc = function(oForm){
ajaxplorer.getUserSelection().updateFormOrUrl(oForm);
if(!ajaxplorer.actionBar.configEditor){
ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
}
ajaxplorer.actionBar.configEditor.setForm(oForm);
ajaxplorer.actionBar.configEditor.initCreateRepoWizard('template');
};
modal.showDialogForm('Create Repository', 'create_repository_box', loadFunc, null, null, false, true);
]]></clientCallback>
</processing>
</action>
<action name="user_update_role" fileDefault="false">
<gui text="ajxp_conf.94" title="ajxp_conf.82" src="edit.png" accessKey="edit_access_key" hasAccessKey="true">
<context selection="true" dir="" recycle="hidden" behaviour="hidden"
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/conf.sql/class.sqlConfDriver.php
Expand Up @@ -172,7 +172,7 @@ public function repoToArray($repository)
'display' => $repository->getDisplay(),
'accessType' => $repository->getAccessType(),
'recycle' => $repository->recycle,
'bcreate' => $repository->getCreate(),
'bcreate' => intval($repository->getCreate()),
'writeable' => $repository->isWriteable(),
'enabled' => $repository->isEnabled(),
'options' => $repository->options,
Expand Down

0 comments on commit 1e55ab5

Please sign in to comment.