/* * Ext JS Library 2.0.1 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ var win; var candleStore; function openGallery(gid) { //global, because used in galleryList.php if (gid>0) { imageStore.proxy.conn.url = 'xml.php?type=getPhotoList&gid='+gid; imageStore.load(); //reloads the images if(!win){ win = new Ext.Window({ applyTo : 'dead-gallery-detail', layout : 'fit', width : 500, height : 400, closeAction :'hide', plain : true, title: "Name der Galerie", items: [view], buttons: [{ text : 'Schließen', handler : function() {win.hide();} }] }); } /* win.on('show',function(){ win.center(); }); */ win.show(); //Ext.get('dead-gallery-detail').update("789"); //win.body.dom.innerHTML="123"; } } var imageData = Ext.data.Record.create([ {name: 'mid', type: 'int'}, {name: 'gid', type:'int'}, {name: 'title', type: 'string'}, {name: 'image', type: 'string'}, {name: 'imageweb', type: 'string'}, {name: 'imageSmall', type: 'string'}, {name: 'status', type: 'string'}, {name: 'hide', type:'int'} ]); var imageStore = new Ext.data.Store({ url: 'xml.php?type=editMediaList>ype=photo&gid=nothing', //shows nothing in the first step //url: 'xml.php?type=editMediaList&uid=>ype=photo', reader: new Ext.data.XmlReader({record: 'media'}, imageData) //sortInfo:{field:'title', direction:'ASC'} //autoLoad: true }); Ext.onReady(function() { Ext.getBody().on('click', function(eventObject, domObject, listenerOptions) { Shadowbox.clearCache(); parts = domObject.id.split("_"); mid = parts[1]; firstLinkToShow = document.getElementById("mid_"+mid); //Shadowbox.clearCache(); Shadowbox.setup(); Shadowbox.open(firstLinkToShow); //Shadowbox.open(); win.hide(); //console.debug(domObject.attributes[2].value); // log callback function params to Firebug }, this, {delegate: '.shadowboxImage'}); }); var view = new Ext.DataView({ itemSelector: 'div.thumb-wrap', style:'overflow:auto', multiSelect: true, //plugins: new Ext.DataView.DragSelector({dragSafe:true}), store: imageStore, loadingText: 'Galerie wird geladen...' , //store: new Ext.data.JsonStore({ // url: '../view/get-images.php', // autoLoad: true, // root: 'images', // id:'name', // fields:[ // 'name', 'url', // {name: 'shortName', mapping: 'name', convert: shortName} // ] //}), tpl: new Ext.XTemplate( '', '', '') }); Ext.onReady(function(){ var btnInformOthers = new Ext.Action({ text:'Andere über diesen Todesfall informieren', tooltip:'Informieren Sie andere Personen über diesen Trauerfall', iconCls:'dead-edit', disabled: false, handler: function(){ informOthersWindow.show(); } }); myXmlReader = Ext.extend(Ext.data.XmlReader, { readRecords: function(doc) { if(Ext.isGecko) doc.normalize(); return myXmlReader.superclass.readRecords.call(this, doc); } }); xmlReader=new myXmlReader({ record : 'entry', totalRecords: 'count', success: '@success' },[ 'name','flash' ]); candleStore = new Ext.data.Store({ url: 'xml.php?type=loadCandleBookEntries&uid=58422', reader: xmlReader, record: 'entry' //,sortInfo:{field:'uid', direction:'ASC'} }); candleStore.load(); var tpl = new Ext.XTemplate( '', '
', '
{flash}
', '
{name}
', '
', '
' ); var candleDateView = new Ext.DataView({ store: candleStore, tpl: tpl, autoHeight:true, //multiSelect: true, overClass:'x-view-over', itemSelector:'div.thumb-wrap', emptyText: '' //renderTo:'dead-candle-entries' }); var candlePagingBar = new Ext.PagingToolbar({ pageSize: 20, store: candleStore, autoLoad: true, displayInfo: true, displayMsg: 'Gedenkkerzen {0} - {1} von {2}', emptyMsg: "Noch keine Gedenkkerzen vorhanden." }); var candlePanel= new Ext.Panel({ items: candleDateView, bbar : candlePagingBar, renderTo:'dead-candle-entries', border: false }); //panel.render('dead-candle-entries'); var profile = new Ext.Panel({ title:'
Josef BachmannHilfe
Außervillgraten, 85 Jahre † 08.02.2010
', ctCls: '', renderTo:'profile-home', tbar: [ btnInformOthers //favoritAdd,favoritDelete, message ], //items: [ //new Ext.Button(favoritAdd), // //new Ext.Button(favoritDelete), // //new Ext.Button(message) // //], items:[{ //layout:"fit", layoutOnTabChange: true, border: false, items:[{ xtype:"tabpanel", activeTab:"0", border: false, autoHeight:true, //enableTabScroll:true, //default:{ //cls: '' //}, items: [ { xtype:"panel", title:"Parte", contentEl:"dead-deathnotice", autoHeight:true, autoScroll: true, iconCls:"deathnotice", id:"tabDeathnotice" },{ xtype:"panel", title:"Kondolenzbuch (13)", contentEl:"dead-condolence", autoScroll: true, iconCls:"condolence", id:"tabCondolence" },{ xtype:"panel", title:"Gedenkkerzen (0)", contentEl:"dead-candle", autoScroll: false, iconCls:"candle", id:"tabCandle", height: 765, autoScroll: true },{ xtype:"panel", title:"Trauerbild", contentEl:"dead-mourningpicture", autoScroll: true, iconCls:"mourningpicture", id:"tabMourningpicture" } ] }] }] }); /* var comment = new Ext.Action({ text: 'Voting abgeben', disabled: true, handler: function(){ showCommentWindow(); //Ext.MessageBox.show({ //title: 'Kommentar hinzufügen', //msg: 'Text:', //width:300, //buttons: Ext.MessageBox.OKCANCEL, //multiline: true, //fn: showResultTextcomment }); //comment.setIconClass('add_comment'); }, iconCls: 'add_comment' }); function showCommentWindow () { newCommentWindow.title = "Neues Voting für " + "4rmLU6OO"; newCommentWindow.findById("commentTo").setValue("58422"); newCommentWindow.show(); } var data = Ext.data.Record.create([ {name: 'cid', type: 'int'}, {name: 'body', type:'string'}, {name: 'fromName', type:'string'}, {name: 'date', type:'string'} ]); // create the Data Store storeComments = new Ext.data.Store({ url: 'xml.php?type=showCommentList&uid=58422', //shows nothing in the first step reader: new Ext.data.XmlReader({record: 'comment'}, data), //,sortInfo:{field:'title', direction:'ASC'} autoLoad: true }); */ });