برامج تعليميه
|
البرامج الجديدة |
|
ترتيب بواسطة الاسم التقييم تاريخ الاضافة تاريخ التحديث مرات التنزيل تصاعدي تنازلي تذكر هذه الاعدادات |
|
|
|
|
|
Ext.onReady(function(){
Ext.QuickTips.init();
/* Start toolbar */
var storproto = new Ext.data.SimpleStore({
fields: ["name", "value"],
data : [
["Arabic", "Arabic"] ,
["English", "English"]
]
});
var langbox= new Ext.form.ComboBox({
fieldLabel:"State",
text:"اللغة الافتراضية",
hiddenName:"state",
valueField:"value",
displayField:"name",
typeAhead: true,
mode:"local",
triggerAction:"all",
emptyText:"Arabic",
selectOnFocus:true,
width:150,
store: storproto,
listeners:{
change : function(e){
//alert(e.value);
window.location="index.php?sitelang="+e.value;
},
select : function(e){
//alert(e.value);
window.location="index.php?sitelang="+e.value;
}
}
})
var searchbox = new Ext.form.TextField({
id:'searchbox',emptyText:"بحث عن",
listeners:{
specialkey:function(f,o){
if(o.getKey()==13){
mysearchboxval = searchbox.getValue()
if(mysearchboxval){
window.location= 'search/'+mysearchboxval+ '.html'
}else{
Ext.example.msg('خطأ', 'برجاء تحديد كلمات البحث', '', '');
}
}
}
}
})
/*
var map = new Ext.KeyMap(document, {
key: Ext.EventObject.ENTER,
fn: function() {
mysearchboxval = searchbox.getValue()
if(mysearchboxval){
window.location= 'search/'+mysearchboxval+ '.html'
}else{
Ext.example.msg('خطأ', 'برجاء تحديد كلمات البحث', '', '');
}
},
scope: 'searchbox'
})
*/
function onItemClick (){}
var langmenu= new Ext.Toolbar.MenuButton({
text: 'Split Button',
handler: onItemClick,
tooltip: {text:'This is a an example QuickTip for a toolbar item', title:'Tip Title'},
iconCls: 'blist',
// Menus can be built/referenced by using nested menu config objects
menu : {items: [
{text: '
Bold', handler: onItemClick},
{text: '
Italic', handler: onItemClick},
{text: '
Underline', handler: onItemClick},
'-'
]}
})
var tb = new Ext.Toolbar({ width:500 });
tb.render('toolbar');
tb.add(
{
text: 'ملفاتي',
iconCls:'icon-columnadd',
handler: function(){
showwatchlist()
}
}
)
tb.addSeparator()
tb.add(
{
id: 'contactbutton',
text: 'اتصل بنا',
iconCls:'icon-mail_post_to3',
handler: function(){
}
}
)
tb.addSeparator()
tb.add(
{
text: 'بحث',
iconCls:'viewmag',
handler: function(){
mysearchbox = Ext.getCmp('searchbox')
mysearchboxval = mysearchbox.getValue()
if(mysearchboxval){
window.location= 'search/'+mysearchboxval+ '.html'
}
}
} )
tb.add( searchbox )
tb.addSeparator()
tb.add( langbox )
tb.addSeparator()
/* End toolbar */
function showwatchlist(){
var store = new Ext.data.Store({
// load using script tags for cross domain, if the data in on the same domain as
// this page, an HttpProxy would be better
proxy: new Ext.data.scriptTagProxy({
url: 'index.php?do=showwatchlist'
}),
// create reader that reads the Topic records
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'totalCount',
id: 'soft_id',
fields: [
'soft_name' ,
'soft_cat' ,
'soft_img'
]
})
// turn on remote sorting
//remoteSort: true
});
store.on('load', function() {
var el = gridpm.getGridEl();
noresults = new Ext.Panel
({
id: 'noresults',
width:300,
items:[{html:'لا يوجد نتائج'}]
})
if (store.getTotalCount() == 0 && typeof el == 'object') {
el.mask('لا يوجد نتائج', 'x-mask');
http://gridpm.disable();http://win.add(noresults);http://win.setWidth(300);http://win.setHeight(200);http://win.disable(); win.doLayout();
}else{
http://gridpm.enable();el.unmask();
http://store.load();http://gridpm.enable();//noresults = Ext.getCmp('noresults')
http://win.remove(noresults);http://win.add(gridpm);http://win.doLayout(); }
});
TippPnel = new Ext.Panel({
id: 'tippanel',
title: 'مساعدة',
autoWidth:true,
collapsible :true,
closable :true,
items:[{html:'هذه القائمة تساعدك في حفظ وترتيب ملفاتك المفضلة من اجل سرعة الرجوع اليها في اي وقت ومن اي مكان في الموقع'}]
})
var xg = Ext.grid;
var sm = new xg.CheckboxSelectionModel({singleSelect:true});
var sm2 = new xg.CheckboxSelectionModel( { singleSelect:false});
var cm = new Ext.grid.ColumnModel([sm,
{ id:'soft_name', header: "اسم البرنامج", width: 200, sortable: true, dataIndex: 'soft_name'},
{ id:'soft_cat', header: "التصنيف", width: 200, sortable: true, dataIndex: 'soft_cat'},
{ id:'soft_img', header: "الصورة", width: 300, sortable: true, dataIndex: 'soft_img'}
]);
win = Ext.getCmp('watchlistwin');
if(!win){
win = new Ext.Window({
id: 'watchlistwin',
title:'ملفاتي',
width:600,
height:450,
iconCls: 'icon-grid',
animateTarget : 'watchlistimg',
animCollapse:false,
constrainHeader:true,
autoScroll:true,
maximizable:true,
collapsible :true,
shim:true,
layout: 'fit',
items:[
gridpm = new Ext.grid.GridPanel({
autoHeight :true,
width: 500,
id:'gridpm',
store: store,
cm: cm,
sm: sm2,
stripeRows: true,
collapsible :true,
buttonAlign :'center',
title:'البرامج',
buttons: [
{
text:'حذف المحدد',
handler: function(){
theSelections = gridpm.getSelectionModel().getSelections()
var theSelectionstosend='';
for (var i = 0; i < theSelections.length; i++) {
//alert(theSelections[i].id);
theSelectionstosend= theSelectionstosend+'__'+theSelections[i].id;
}
var theSelectionstosendTEST = theSelectionstosend.split('__');
//alert(theSelectionstosendTEST.length)
if(theSelectionstosendTEST.length > 1){
Ext.Ajax.request({
url: "index.php",
params: {ids: theSelectionstosend, 'do':'removewatchlist'},
success:function ( result,options ) {
//alert(result.responseText);
store.load();
},
failure :function(){ }
})
}
}
}
]
})
,TippPnel]
});
}
http://win.setWidth(600);http://win.setHeight(450); http://gridpm.doLayout();http://win.doLayout();if(win.isVisible()){
gridpm = Ext.getCmp('gridpm')
gridpm.getStore().load()
}else{
win.show();
store.load();
}
}
function checkswatchlistanswer(selection){
if(selection == 'yes'){
showwatchlist()
}
}
var watchlistimg = Ext.get('watchlistimg');
if(watchlistimg){
watchlistimg.on('click', function(){
lid = document.getElementById('thelid').value
Ext.Ajax.request({
url: "index.php?do=addwatchlist&id="+lid,
success:function ( result,options ) {
myresponseText = result.responseText
//alert(myresponseText)
var showbox = 0;
win = Ext.getCmp('watchlistwin');
if(!win){
showbox = 1;
}else{
if(!win.isVisible()){
showbox = 1;
}
}
if(showbox == 1){
Ext.MessageBox.confirm('Confirm', 'تم اضافة البرنامج بنجاح فتح قائمة البرامج ؟', checkswatchlistanswer);
}else{
showwatchlist()
}
},
failure :function(){
alert("Sorry it seems to be an error with shopping cart system")
}
})
});
}
var contactbutton = Ext.getCmp('contactbutton');
contactbutton.on('click', function(){
//CreateNewFWindowWH('index.php?do=contactus','CONTACTWIN', 'Contact us',400,300);
win = Ext.getCmp('contactwin');
form = new Ext.form.FormPanel({
labelAlign: 'top',
id:'myform',
url: 'index.php?do=contactus',
frame:true,
//title: 'Multi Column, Nested Layouts and Anchoring',
bodyStyle:'padding:5px 5px 0',
width: 500,
items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'الاسم',
name: 'name',
anchor:'95%'
}, {
xtype:'textfield',
fieldLabel: 'عنوان الرسالة',
name: 'subject',
anchor:'95%'
}]
},{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: 'رقم الهاتف',
name: 'phone',
anchor:'95%'
},{
xtype:'textfield',
fieldLabel: 'البريد الالكتروني',
name: 'email',
vtype:'email',
anchor:'95%'
}]
}]
},{
xtype:'htmleditor',
id:'bio',
fieldLabel:'الرسالة',
height:100
}],
buttons: [{
text: 'ارسل',
handler: function(){
myform = form.getForm()
if(myform.isValid()){
myform.submit({
waitMsg:'Please Wait...',
reset:true,
success:function ( result ) {
//alert('Success'+ result.Username);
Ext.MessageBox.alert('شكرا لك', 'تم ارسال الرسالة بنجاح');
Ext.getCmp('contactwin').close()
},
failure :function(){ }
});
}
}
}]
});
if(!win){
win = new Ext.Window({
id: 'contactwin',
title:'Contact Us',
width:550,
height:500,
iconCls: 'icon-grid',
shim:false,
animCollapse:false,
constrainHeader:true,
autoScroll:true,
collapsible :true,
shim:true,
layout: 'fit',
items:[form]
});
}
win.show();
});
});
// Ext.onready
function addtowatch(lid){
div = "addwatchlist"+ lid
myvar = '
'
document.getElementById(div).innerHTML=myvar
Ext.Ajax.request({
url: "index.php?do=addwatchlist&id="+lid,
success:function ( result,options ) {
myresponseText = result.responseText
Ext.example.msg('شكرا لك', 'تم اضافة البرنامج', '', '');
win = Ext.getCmp('watchlistwin');
if(win){
if(win.isVisible()){
gridpm = Ext.getCmp('gridpm')
gridpm.getStore().load()
win.focus()
}
}
},
failure :function(){
alert("Sorry it seems to be an error")
}
})
return false;
}
function removefromwatch(lid){
div = "addwatchlist"+ lid
myvar = '
'
document.getElementById(div).innerHTML=myvar
Ext.Ajax.request({
url: "index.php?do=removewatchlist&ids=__"+lid,
success:function ( result,options ) {
myresponseText = result.responseText
Ext.example.msg('شكرا لك', 'تم حذف البرنامج من قائمة ملفاتك', '', '');
win = Ext.getCmp('watchlistwin');
if(win){
if(win.isVisible()){
gridpm = Ext.getCmp('gridpm')
gridpm.getStore().load()
win.focus()
}
}
},
failure :function(){
alert("Sorry it seems to be an error ")
}
})
return false;
}
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#e0ecff';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['POSITION'] = 'bottom';
skin['DEFAULT_COMMENT_TEXT'] = '- \u0627\u0636\u0641 \u062a\u0639\u0644\u064a\u0642\u0643 \u0647\u0646\u0627 -';
skin['HEADER_TEXT'] = '\u062a\u0639\u0644\u064a\u0642\u0627\u062a';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderSocialBar(
{ id: 'div-6670987192292817463',
site: '06090622533953423766',
'view-params':{"scope":"PAGE","features":"video,comment","showWall":"true"}
},
skin);
html, body {height: 100%; overflow: auto; };#fc-friendbar-outer {background:#E0ECFF;left:0;height: 35px;margin-right: 20px;padding:0;position:absolute; bottom: 0;width:100%;z-index:5000;}#fc-friendbar-outer-shadow {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_tc.png", sizingMethod="scale");left:0;height:10px;margin-right: 20px;padding:0;position:absolute; bottom:35px;width:100%;z-index:4998;}.fc-friendbar-Drawer {display: block;padding:0;position:absolute; bottom:34px;z-index:4999;}.fc-friendbar-wallpaper {background: white;height: 100%;margin-right: 10px;}.fc-friendbar-Target {border: 1px solid #ccc;height: 100%;left: 0;background-image: url(http://www.google.com/friendconnect/scs/images/loading.gif);background-position: center;background-repeat: no-repeat;}.fc-friendbar-shadow-cr {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_cr.png", sizingMethod="scale");height: 100%;position:absolute;right: 0;top: 0;width:10px;}.fc-friendbar-shadow-bl {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_bl.png", sizingMethod="scale");height: 10px;position:absolute;width:10px;}.fc-friendbar-shadow-tl {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_tl.png", sizingMethod="scale");height: 10px;position:absolute;left:0px;width:10px;}.fc-friendbar-shadow-bc {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_bc.png", sizingMethod="scale");height: 10px;left: 10px;position:absolute;right: 10px;}.fc-friendbar-shadow-tc {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_tc.png", sizingMethod="scale");height: 10px;left: 10px;margin-left: 10px;margin-right: 10px;right: 10px;}.fc-friendbar-shadow-br {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_br.png", sizingMethod="scale");height: 10px;position:absolute;right: 0;width: 10px;}.fc-friendbar-shadow-tr {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://www.google.com/friendconnect/scs/images/shadow_tr.png", sizingMethod="scale");height: 10px;position:absolute;right: 0;top: 0;width: 10px;}
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-508756-1");
pageTracker._trackPageview();
} catch(err) {}