Notes
Notes - notes.io |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HRC Application</title>
<script type="text/javascript">
hrc = {};
hrc.util = {};
</script>
<script type="text/javascript" src="static/extjs/ext-all-6.0.2.js"> </script>
<script type="text/javascript" src="Data.js"> </script>
<script type="text/javascript" src="static/js/util.js"> </script>
<link rel="stylesheet" type="text/css"
href="static/extjs/theme-triton-all.css" />
<link rel="shortcut icon" href="static/extjs/images/favicon.ico"
type="image/x-icon" />
</head>
<body>
<script type="text/javascript">
Ext.onReady(function() {
//---------------------------------------------------------------------------------
//TABS CREATION AND ENCAPSULATION
Ext.create('Ext.TabPanel', {
fullscreen : true,
items : [ {
title : 'All Invoices'
}, {
title : 'Open Invoices'
}, {
title : 'Closed Invoices'
} ],
listeners : {
render : function() {
this.items.each(function(i) {
i.tab.on('click', function() {
if (i.title == "All Invoices") {
//---------------------
All_Adv.show();
All_Edit_Predict.show();
All_invoices.show();
//--------------------
} else if (i.title == "Open Invoices") {
//-------------------------
All_Adv.hide();
All_Edit_Predict.hide();
All_invoices.hide();
All_adder.hide();
//---------------------
Open_Adv.show();
Open_Edit_Predict.show();
Open_invoices.show();
//--------------------
} else if (i.title == "Closed Invoices") {
//-------------------------
All_Adv.hide();
All_Edit_Predict.hide();
All_invoices.hide();
All_adder.hide();
//---------------------
Open_Adv.hide();
Open_Edit_Predict.hide();
Open_invoices.hide();
Open_adder.hide();
//---------------------
Closed_Adv.show();
Closed_Edit_Predict.show();
Closed_invoices.show();
//--------------------
}
});
});
}
},
renderTo : Ext.getBody()
});
//-------------------------------------------------------------------------------------
//DATA-LOADING
var store = hrc.util.createStore('userdata');
//----------------------------------------------------------------------------------
//ALL INVOICE ADVANCE-SEARCH
var c=true;
var All_Adv = Ext.create('Ext.panel.Panel', {
title : 'Invoices',
itemId:'all_invoices_toolbar',
items : [ {
buttonAlign : 'right',
buttons : [ {
xtype : 'button',
formBind : true,
itemId:'all_invoices_advancesearch_button',
enableToggle : true,
text : 'Advance-Search',
listeners : {
click : function() {
if(c){
All_adder.show();
c=false;
}
else
{
All_adder.hide();
c=true;
}
}
}
} ]
} ],
renderTo : Ext.getBody()
}); All_Adv.hide();
//----------------------------------------------------------------------
//ALL INVOICE ADVANCE SAERCH FORM
var All_adder = Ext.create('Ext.form.Panel', {
requires : [
'Ext.form.Panel', 'Ext.form.field.Text', 'Ext.button.Button' ],
title : 'Simple Form',
labelAlign : 'right',
closeAction : 'destroy',
bodyPadding : 5,
itemId:'all_invoices_advancesearch_panel',
style : {
marginLeft : 'auto',
//marginRight: 'auto'
},
width : 650,
height : 200,
labelAlign : 'right',
defaults : {
anchor : '100%'
},
items : [ {
xtype : 'form',
bodyPadding : 10,
layout : 'column',
items : [ {
xtype : 'datefield',
itemId:'all_invoices_due_date',
margin:'10px',
name : 'Due-Date',
fieldLabel : 'Due-Date',
}, {
xtype : 'numberfield',
name : 'Fiscal Year',
itemId:'all_invoices_fiscal_year',
margin:'10px',
value : 2000,
maxValue : 2019,
minValue : 1997,
fieldLabel : 'Fiscal Year',
}, {
xtype : 'textfield',
margin:'10px',
itemId:'all_invoices_actual_open_account',
name : 'Actual Open Amount',
fieldLabel : 'Actual Open Amount',
}, {
xtype : 'textfield',
margin:'10px',
itemId:'all_invoices_customer_name',
name : 'Customer Name',
fieldLabel : 'Customer Name',
}
],
} ],
buttons : [ {
xtype : 'button',
formBind : true,
itemId : 'all_invoices_search_button',
text : 'Search',
listeners : {
click : function() {
}
}
}, {
xtype : 'button',
formBind : true,
itemId : 'all_invoices_clear_advanceSearch',
text : 'Clear',
listeners : {
click : function() {
}
}
} ],
renderTo : Ext.getBody()
});
All_adder.hide();
// --------------------------------------------------------------------
//ALL INVOICE EDIT AND PREDICT
var All_Edit = Ext.create('Ext.Button', {
text : 'Edit',
itemId:'all_invoices_edit_button',
renderTo : Ext.getBody(),
handler : function() {
//itemId:'all_invoices_edit_Panel',
alert('You clicked the Edit button!');
}
});All_Edit.hide();
var All_Predict=Ext.create('Ext.Button', {
text : 'Predict',
itemId:'all_invoices_predict_button',
renderTo : Ext.getBody(),
handler : function() {
//itemId:'all_invoices_predict_panel',
alert('You clicked the Predict button!');
}
});All_Predict.hide();
var All_Edit_Predict = Ext.create('Ext.panel.Panel', {
border : false,
itemId:'all_invoices_toolbar',
items : [ {
buttonAlign : 'left',
buttons : [ All_Edit.show() , All_Predict.show() ]
} ],
renderTo : Ext.getBody()
});All_Edit_Predict.hide()
//------------------------------------------------------------------------------------
//GRID
//ALL INVOICE
var All_invoices = Ext.create('Ext.grid.Panel', {
itemId : 'all_invoices_grid_panel',
height : 700,
store : store,
columns : [ {
text : 'Name',
dataIndex : 'name',
flex : 1
}, {
text : 'Class',
dataIndex : 'Class',
flex : 1
}, {
text : 'Phone',
dataIndex : 'phone',
flex : 1
} ],
bbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
tbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
renderTo : Ext.getBody()
});
//----------------------------------------------------------------------------------------
//OPENN
//-------------------------------------------------------------------------------------------
//OPEN-INVOICE ADVANCE-SEARCH
var Open_Adv = Ext.create('Ext.panel.Panel', {
title : 'Invoices',
items : [ {
buttonAlign : 'right',
buttons : [ {
xtype : 'button',
formBind : true,
itemId : 'Adv',
enableToggle : true,
text : 'Advance-Search',
listeners : {
click : function() {
if(c){
Open_adder.show();
c=false;
}
else
{
Open_adder.hide();
c=true;
}
}
}
} ]
} ],
renderTo : Ext.getBody()
}); Open_Adv.hide();
//----------------------------------------------------------------------
//OPEN-INVOICE ADVANCE SAERCH FORM
var Open_adder = Ext.create('Ext.form.Panel', {
requires : [
'Ext.form.Panel', 'Ext.form.field.Text', 'Ext.button.Button' ],
title : 'Simple Form',
labelAlign : 'right',
closeAction : 'destroy',
bodyPadding : 5,
Id : 'FormID',
style : {
marginLeft : 'auto',
//marginRight: 'auto'
},
width : 700,
height : 200,
labelAlign : 'right',
defaults : {
anchor : '100%'
},
items : [ {
xtype : 'form',
bodyPadding : 20,
layout : 'column',
items : [ {
xtype : 'datefield',
margin:'10px',
name : 'Due-Date',
fieldLabel : 'Due-Date',
}, {
xtype : 'numberfield',
name : 'Fiscal Year',
margin:'10px',
value : 2000,
maxValue : 2019,
minValue : 1997,
fieldLabel : 'Fiscal Year',
}, {
xtype : 'textfield',
margin:'10px',
name : 'Actual Open Amount',
fieldLabel : 'Actual Open Amount',
}, {
xtype : 'textfield',
margin:'10px',
name : 'Customer Name',
fieldLabel : 'Customer Name',
} ],
} ],
buttons : [ {
xtype : 'button',
formBind : true,
itemId : 'Src',
text : 'Search',
listeners : {
click : function() {
}
}
}, {
xtype : 'button',
formBind : true,
itemId : 'clr',
text : 'Clear',
listeners : {
click : function() {
}
}
} ],
renderTo : Ext.getBody()
});
Open_adder.hide();
// --------------------------------------------------------------------
//OPEN-INVOICE EDIT AND PREDICT
var Open_Edit = Ext.create('Ext.Button', {
text : 'Edit',
renderTo : Ext.getBody(),
handler : function() {
alert('You clicked the Edit button!');
}
});Open_Edit.hide();
var Open_Predict=Ext.create('Ext.Button', {
text : 'Predict',
renderTo : Ext.getBody(),
handler : function() {
alert('You clicked the Predict button!');
}
});Open_Predict.hide();
var Open_Edit_Predict = Ext.create('Ext.panel.Panel', {
border : false,
items : [ {
buttonAlign : 'left',
buttons : [ Open_Edit.show() , Open_Predict.show() ]
} ],
renderTo : Ext.getBody()
});Open_Edit_Predict.hide()
//----------------------------------------------------------------------------
//OPEN INVOICE
var Open_invoices = Ext.create('Ext.grid.Panel', {
itemId : 'hrc_grid_panel',
height : 700,
store : store,
columns : [ {
text : 'Name',
dataIndex : 'name',
flex : 1
}, {
text : 'Class',
dataIndex : 'Class',
flex : 1
}, {
text : 'Phone',
dataIndex : 'phone',
flex : 1
} ],
bbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
tbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
renderTo : Ext.getBody()
});
Open_invoices.hide();
//------------------------------------------------------------------------------------------------
// CLOSEEEEEE
//-------------------------------------------------------------------------------------------
//CLOSE-INVOICE ADVANCE-SEARCH
var Closed_Adv = Ext.create('Ext.panel.Panel', {
title : 'Invoices',
items : [ {
buttonAlign : 'right',
buttons : [ {
xtype : 'button',
formBind : true,
itemId : 'Adv',
enableToggle : true,
text : 'Advance-Search',
listeners : {
click : function() {
if(c){
Closed_adder.show();
c=false;
}
else
{
Closed_adder.hide();
c=true;
}
}
}
} ]
} ],
renderTo : Ext.getBody()
}); Closed_Adv.hide();
//----------------------------------------------------------------------
//CLOSE-INVOICE ADVANCE SAERCH FORM
var Closed_adder = Ext.create('Ext.form.Panel', {
requires : [
'Ext.form.Panel', 'Ext.form.field.Text', 'Ext.button.Button' ],
title : 'Simple Form',
labelAlign : 'right',
closeAction : 'destroy',
bodyPadding : 5,
itemId : 'closed_invoices_advancesearch_panel',
style : {
marginLeft : 'auto',
//marginRight: 'auto'
},
width : 700,
height : 200,
labelAlign : 'right',
defaults : {
anchor : '100%'
},
items : [ {
xtype : 'form',
bodyPadding : 20,
layout : 'column',
items : [ {
xtype : 'datefield',
margin:'10px',
name : 'Due-Date',
fieldLabel : 'Due-Date',
}, {
xtype : 'numberfield',
name : 'Fiscal Year',
margin:'10px',
value : 2000,
maxValue : 2019,
minValue : 1997,
fieldLabel : 'Fiscal Year',
}, {
xtype : 'textfield',
margin:'10px',
name : 'Actual Open Amount',
fieldLabel : 'Actual Open Amount',
}, {
xtype : 'textfield',
margin:'10px',
name : 'Customer Name',
fieldLabel : 'Customer Name',
} ],
} ],
buttons : [ {
xtype : 'button',
formBind : true,
itemId : 'Src',
text : 'Search',
listeners : {
click : function() {
}
}
}, {
xtype : 'button',
formBind : true,
itemId : 'clr',
text : 'Clear',
listeners : {
click : function() {
}
}
} ],
renderTo : Ext.getBody()
});
Closed_adder.hide();
// --------------------------------------------------------------------
// CLOSE-INVOICE EDIT AND PREDICT
var Closed_Edit = Ext.create('Ext.Button', {
text : 'Edit',
renderTo : Ext.getBody(),
handler : function() {
alert('You clicked the Edit button!');
}
});Closed_Edit.hide();
var Closed_Edit_Predict = Ext.create('Ext.panel.Panel', {
border : false,
items : [ {
buttonAlign : 'left',
buttons : [ Closed_Edit.show() ]
} ],
renderTo : Ext.getBody()
});Closed_Edit_Predict.hide()
//----------------------------------------------------------------------------
// CLOSE-INVOICE CLOSED INVOICE
var Closed_invoices = Ext.create('Ext.grid.Panel', {
itemId : 'hrc_grid_panel',
height : 700,
store : store,
columns : [
{ text : 'Name', dataIndex : 'name',flex : 1},
{ text : 'Class', dataIndex : 'Class',flex : 1},
{ text : 'Phone', dataIndex : 'phone', flex : 1 }
],
bbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
tbar : new Ext.PagingToolbar({
store : store,
pageSize : 20,
displayInfo : true,
style : 'padding-right : 17px;',
displayMsg : 'Users' + ' {0} - {1} of {2}',
emptyMsg : "No Records to display",
items : []
}),
renderTo : Ext.getBody()
});
Closed_invoices.hide();
});
//------------------------------------------------------------------------------------------------
</script>
</body>
</html>
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team