Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dojo.provide('app.views.master.ProdukPanel');
- dojo.require('dijit.layout.ContentPane');
- dojo.require('dijit.layout.BorderContainer');
- dojo.require('dojox.grid.DataGrid');
- dojo.require('dojox.form.Manager');
- dojo.require('dijit.form.ValidationTextBox');
- dojo.require('app.views.master.form.ProdukForm');
- dojo.require('app.views.master.grid.TableProduk'); //Tambahkan
- dojo.require('dijit.form.Form');
- dojo.declare('app.views.master.ProdukPanel', null, {
- produkTable: null,
- form: null,
- mainPanel: null,
- constructor: function(id, titlePanel) {
- this.initComponents(id, titlePanel);
- },
- initComponents: function(id, titlePanel) {
- this.produkTable = new app.views.master.grid.TableProduk().getTableProduk(); //tambahkan
- this.form = new app.views.master.form.ProdukForm({
- id: 'formProdukPanel',
- idProdukName: 'txtNamaProduk',
- idOnSubmit: 'onSubmitProdukForm',
- idOnReset: 'onResetProdukForm'
- });
- var contentPane = new dijit.layout.ContentPane({
- region: 'center',
- content: this.form
- });
- var tab1 = new dijit.layout.TabContainer({
- id: 'tab1',
- region: 'center'
- });
- var contentPane2 = new dijit.layout.ContentPane({
- region: 'bottom',
- content: tab1,
- title: 'test',
- style: 'width: 100%; height; 70%;'
- });
- var buton = new dijit.form.Button({});
- var component = '<button dojoType="dijit.form.Button">Add</button>';
- component += '<button dojoType="dijit.form.Button">Edit</button>';
- component += '<button dojoType="dijit.form.Button">Delete</button>';
- var contentPane3 = new dijit.layout.ContentPane({
- region: 'center',
- content: component,
- title: 'Produk',
- style: 'width: 100%; height; 10%;'
- });
- // we must call this function
- contentPane.startup();
- contentPane2.startup();
- contentPane3.startup();
- this.mainPanel = new dijit.layout.BorderContainer({
- id: id,
- title: titlePanel,
- closable: true,
- design:'sidebar',
- gutters:true,
- liveSplitters:true,
- style: 'height: 100%;width: 100%;'
- });
- tab1.addChild(contentPane3);
- this.mainPanel.addChild(contentPane);
- this.mainPanel.addChild(contentPane2);
- /*this.mainPanel.addChild(new dijit.layout.ContentPane({
- region: 'bottom',
- splitter: true,
- content: this.produkTable.domNode,
- style: 'height: 30%;width: 20%;'
- }));*/ // uncomment disini
- },
- getMainPanel: function() {
- return this.mainPanel;
- }
- });
- Keterangan : penjelasan Ada Di akhir baris
Add Comment
Please, Sign In to add comment