'84378f54966381befd040dafbdc221d6' :"<i class=\"fa fa-plus\"></i> Add into the email",
'361bacb1a72a350ee34e2f31a6a91dab' :"Alignment:",
'2cd3a1900dd0060540b418b2a60f6eec' :"Show all images",
- 'f48f7c7bccb5e29c83d87984c49ad8d4' :"Show image for this email",
'ed807858fcb68abdd180481f1fcba5c5' :"<i class=\"fa fa-trash\"></i> Delete",
'031fa343a28d221a25d2bcd942437174' :"Alternate Text:",
'48ccf48dcf2218a413ce473262f21a0c' :"Width: ",
items : [
{
xtype : 'Column',
- sm : 8,
+ md : 12,
+ listeners : {
+ render : function (_self)
+ {
+ _this.masonryBlock = this;
+ }
+ },
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
{
if (action.type == 'setdata') {
+ _this.showType = 'public';
+
this.url = _this.data._url ? baseURL + _this.data._url : baseURL + '/Roo/Images.php';
this.el.dom.action = this.url;
_this.uploadDL.inputEl().on("change",function(){
- _this.form.findField('onid').setValue(_this.showTypeBtn.isActive() ? _this.data.onid : 0);
+ _this.form.findField('onid').setValue((_this.showType == 'private') ? _this.data.onid : 0);
_this.form.doAction('submit');
-
- //_this.dialog.uploadProgress.defer(1000, _this.dialog);
});
},
{
xtype : 'Container',
+ cls : 'col-md-12',
listeners : {
render : function (_self)
{
items : [
{
xtype : 'Column',
- md : 12,
+ md : 8,
+ sm : 12,
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
{
xtype : 'Button',
html : _this._strings['53ab4599d0106e32d015649175a70d7b'] /* <i class="fa fa-filter"></i> Filter */,
- style : 'float:left;',
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
menu : {
listeners : {
click : function (_self, e)
{
+ _this.showType = 'private';
+
_this.masonry.load();
}
},
listeners : {
click : function (_self, e)
{
+ _this.showType = 'public';
+
_this.masonry.load();
}
},
]
}
},
- {
- xtype : 'Button',
- html : _this._strings['f48f7c7bccb5e29c83d87984c49ad8d4'] /* Show image for this email */,
- pressed : false,
- style : 'float:left;',
- listeners : {
- render : function (_self)
- {
- _this.showTypeBtn = this;
- },
- toggle : function (b, e, pressed)
- {
- _this.showTypeBtn.setText(!pressed ? 'Show all images' : 'Show image for this email');
-
- _this.masonry.load();
- }
- },
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
- },
{
xtype : 'Input',
placeholder : _this._strings['37c1097cf82226d511586ecd99ed97cf'] /* search for image */,
- style : 'float:left; width: 300px; margin-left: 15px;',
+ style : 'width: 200px; margin-left: 15px;display: inline-block; margin-bottom: 0px; vertical-align: middle;',
listeners : {
render : function (_self)
{
xtype : 'Column',
cls : 'text-right',
md : 4,
+ sm : 12,
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [
{
xtype : 'Button',
html : _this._strings['5350277f16d9998c57fa7e1d17be2a76'] /* <i class="fa fa-upload"></i> Upload Image */,
+ size : 'sm',
weight : 'primary',
listeners : {
click : function (_self, e)
{
xtype : 'Button',
html : _this._strings['ed807858fcb68abdd180481f1fcba5c5'] /* <i class="fa fa-trash"></i> Delete */,
+ size : 'sm',
style : 'margin-left: 15px;',
weight : 'default',
listeners : {
_this.masonry.clearAll();
+ var params = {
+ ontable : 'core_email',
+ 'search[filename]' : _this.searchBox.getValue()
+ };
+
+ if(_this.showType == 'private'){
+ params.onid = _this.data.onid;
+ }
+
new Pman.Request({
url: baseURL + '/Roo/Images',
method: 'GET',
- params: {
- ontable : 'core_email',
- onid : _this.showTypeBtn.isActive() ? _this.data.onid : 0,
- 'search[filename]' : _this.searchBox.getValue()
- },
+ params: params,
success: function(ret) {
if(!ret.data.length){
_this.deleteBtn.hide();
+ _this.masonryBlock.el.removeClass(['col-md-12','col-md-8']).addClass('col-md-12');
+
if(!this.isSelected()){
return;
}
+ _this.masonryBlock.el.removeClass(['col-md-12','col-md-8']).addClass('col-md-8');
+
if(_this.masonry.getSelected().length == 1){
_this.deleteBtn.show();
}
},
{
xtype : 'Column',
- sm : 4,
+ md : 4,
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap',
items : [