Extending CJuiDialog

You are viewing revision #5 of this wiki article.
This is the latest version of this article.
You may want to see the changes made in this revision.

« previous (#2)

Sometimes you have CJuiDialog with different content but same buttons (or width, height). If you don't want to repeat yourself this is a great solution:


> extensions/dialog/start.php

In start.php write:

class Start extends CJuiDialog
        public function init()
                     'Save'=>'js:function(){alert("alert one");}',      
                     'Cancel'=>'js:function(){alert("alrt two");}', 



Somewhere (in views) create:

$this->beginWidget('ext.dialog.start', array(

And that's it. You will have buttons Save and Cancel everytime.

1 2
Viewed: 18 423 times
Version: Unknown (update)
Category: How-tos
Written by: dstudio
Last updated by: Maurizio Domba Cerin
Created on: Jul 25, 2012
Last updated: 11 years ago
Update Article


View all history

Related Articles