Created
April 10, 2014 20:43
-
-
Save christianseel/10421374 to your computer and use it in GitHub Desktop.
Dieser JS Code fügt in die rechte Spalte einer Resource beliebigen HTML Code ein (z.B. Hinweise). Sollte per Plugin OnDocFormPreRender eingefügt werden.
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
var content = ''; | |
content += '<h3>Hinweise</h3>'; | |
content += '<p>Hinweistext</p>'; | |
content += '<style>.hdkInfo-panel p {margin-bottom: 10px; line-height:1.6;} .hdkInfo-panel h4 {margin-top: 15px; margin-bottom: 5px;}</style>'; | |
var hdkInfo = function(config) { | |
config = config || {}; | |
}; | |
Ext.extend(hdkInfo, Ext.Component, { | |
page: {}, window: {}, grid: {}, tree: {}, panel: {}, combo: {}, config: {}, view: {}, | |
initialize: function() { | |
hdkInfo.addPanel(); | |
}, | |
addPanel: function() { | |
var fp = Ext.getCmp('modx-resource-main-right'); | |
fp.add({ | |
xtype: 'panel', | |
anchor: '100%', | |
border: false, | |
fieldLabel: _('hdkInfo.prevbox'), | |
layout: 'form', | |
items: [{ | |
columnWidth: .67, | |
xtype: 'panel', | |
baseCls: 'hdkInfo-panel', | |
bodyStyle: 'padding: 15px 0px;', | |
border: false, | |
autoHeight: true, | |
items: [{ | |
xtype: 'box', | |
html: content, | |
style: 'background-color: #fff; font-size:12px; display:block; color:#222;' | |
}] | |
}] | |
}); | |
fp.doLayout(); | |
} | |
}); | |
Ext.reg('hdkinfo', hdkInfo); | |
hdkInfo = new hdkInfo(); | |
Ext.onReady(function() { | |
hdkInfo.initialize(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment