From 151b2f7d102a5988b63255d27c9ad78202c16355 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Mon, 9 Nov 2015 00:33:08 +0100 Subject: Added (partial) website + misc updates for release * recreated the prado website in demos/ * updated some docs to reflect the usage of jquery; removed guide to prototype * updated composer * added task for apigen4 (theme still missing) --- demos/quickstart/protected/controls/TopicList.tpl | 2 - .../quickstart/protected/controls/de/TopicList.tpl | 2 - .../quickstart/protected/controls/es/TopicList.tpl | 2 - .../quickstart/protected/controls/fr/TopicList.tpl | 2 - .../quickstart/protected/controls/id/TopicList.tpl | 2 - .../quickstart/protected/controls/ja/TopicList.tpl | 2 - .../quickstart/protected/controls/pl/TopicList.tpl | 2 - .../quickstart/protected/controls/zh/TopicList.tpl | 2 - .../pages/ActiveControls/ActiveRatingList.page | 2 +- .../pages/ActiveControls/Introduction.page | 4 +- .../protected/pages/Advanced/Scripts1.page | 96 --- .../protected/pages/Advanced/Scripts2.page | 253 ------- .../protected/pages/Advanced/Scripts3.page | 29 +- .../protected/pages/Advanced/es/Scripts1.page | 96 --- .../protected/pages/Advanced/es/Scripts2.page | 253 ------- .../protected/pages/Advanced/id/Scripts1.page | 86 --- .../protected/pages/Advanced/id/Scripts2.page | 214 ------ .../protected/pages/Controls/HtmlArea4.page | 2 +- .../protected/pages/Controls/Markdown.page | 2 +- .../protected/pages/Database/ViewsArUpdate.page | 14 +- .../protected/pages/Fundamentals/Pages.page | 2 +- .../pages/GettingStarted/CommandLine.page | 12 +- .../pages/GettingStarted/Installation.page | 4 +- .../pages/GettingStarted/Upgrading32.page | 8 +- .../protected/pages/GettingStarted/Wsat.page | 10 +- .../protected/pages/JuiControls/Home.page | 10 +- .../protected/pages/JuiControls/Interactions.page | 12 +- .../protected/pages/JuiControls/Widgets.page | 10 +- demos/site/.htaccess | 8 + demos/site/assets/.gitignore | 2 + demos/site/index.php | 17 + demos/site/protected/.htaccess | 1 + demos/site/protected/Common/SimpleMenu.php | 86 +++ demos/site/protected/Layouts/MainLayout.php | 5 + demos/site/protected/Layouts/MainLayout.tpl | 56 ++ demos/site/protected/Pages/About.page | 55 ++ demos/site/protected/Pages/Demos.page | 31 + demos/site/protected/Pages/Documentation.page | 42 ++ demos/site/protected/Pages/Download.page | 116 ++++ demos/site/protected/Pages/Home.page | 37 + demos/site/protected/Pages/License.page | 28 + demos/site/protected/Pages/Tos.page | 42 ++ demos/site/protected/application.xml | 40 ++ demos/site/protected/runtime/.gitignore | 2 + demos/site/themes/Prado/favicon.ico | Bin 0 -> 3638 bytes demos/site/themes/Prado/imgs/bg.gif | Bin 0 -> 307 bytes demos/site/themes/Prado/imgs/bigmantis.jpg | Bin 0 -> 13447 bytes demos/site/themes/Prado/imgs/bigmantis.jpg.1 | Bin 0 -> 13447 bytes demos/site/themes/Prado/imgs/bottomgradient.gif | Bin 0 -> 269 bytes demos/site/themes/Prado/imgs/bullet_one.gif | Bin 0 -> 343 bytes demos/site/themes/Prado/imgs/bullet_three.gif | Bin 0 -> 369 bytes demos/site/themes/Prado/imgs/bullet_two.gif | Bin 0 -> 355 bytes demos/site/themes/Prado/imgs/mainmenu_active.gif | Bin 0 -> 154 bytes demos/site/themes/Prado/imgs/mainmenu_hover.gif | Bin 0 -> 155 bytes demos/site/themes/Prado/imgs/pradodownload.gif | Bin 0 -> 7159 bytes demos/site/themes/Prado/imgs/pradoheader.gif | Bin 0 -> 15430 bytes demos/site/themes/Prado/imgs/statementsbg.gif | Bin 0 -> 327 bytes demos/site/themes/Prado/style.css | 765 +++++++++++++++++++++ 58 files changed, 1398 insertions(+), 1070 deletions(-) delete mode 100755 demos/quickstart/protected/pages/Advanced/Scripts1.page delete mode 100755 demos/quickstart/protected/pages/Advanced/Scripts2.page delete mode 100755 demos/quickstart/protected/pages/Advanced/es/Scripts1.page delete mode 100755 demos/quickstart/protected/pages/Advanced/es/Scripts2.page delete mode 100755 demos/quickstart/protected/pages/Advanced/id/Scripts1.page delete mode 100755 demos/quickstart/protected/pages/Advanced/id/Scripts2.page create mode 100644 demos/site/.htaccess create mode 100755 demos/site/assets/.gitignore create mode 100755 demos/site/index.php create mode 100755 demos/site/protected/.htaccess create mode 100644 demos/site/protected/Common/SimpleMenu.php create mode 100644 demos/site/protected/Layouts/MainLayout.php create mode 100644 demos/site/protected/Layouts/MainLayout.tpl create mode 100644 demos/site/protected/Pages/About.page create mode 100644 demos/site/protected/Pages/Demos.page create mode 100644 demos/site/protected/Pages/Documentation.page create mode 100644 demos/site/protected/Pages/Download.page create mode 100755 demos/site/protected/Pages/Home.page create mode 100644 demos/site/protected/Pages/License.page create mode 100644 demos/site/protected/Pages/Tos.page create mode 100644 demos/site/protected/application.xml create mode 100755 demos/site/protected/runtime/.gitignore create mode 100644 demos/site/themes/Prado/favicon.ico create mode 100644 demos/site/themes/Prado/imgs/bg.gif create mode 100644 demos/site/themes/Prado/imgs/bigmantis.jpg create mode 100644 demos/site/themes/Prado/imgs/bigmantis.jpg.1 create mode 100644 demos/site/themes/Prado/imgs/bottomgradient.gif create mode 100644 demos/site/themes/Prado/imgs/bullet_one.gif create mode 100644 demos/site/themes/Prado/imgs/bullet_three.gif create mode 100644 demos/site/themes/Prado/imgs/bullet_two.gif create mode 100644 demos/site/themes/Prado/imgs/mainmenu_active.gif create mode 100644 demos/site/themes/Prado/imgs/mainmenu_hover.gif create mode 100644 demos/site/themes/Prado/imgs/pradodownload.gif create mode 100755 demos/site/themes/Prado/imgs/pradoheader.gif create mode 100644 demos/site/themes/Prado/imgs/statementsbg.gif create mode 100755 demos/site/themes/Prado/style.css (limited to 'demos') diff --git a/demos/quickstart/protected/controls/TopicList.tpl b/demos/quickstart/protected/controls/TopicList.tpl index ed57a4b0..c23bd2be 100644 --- a/demos/quickstart/protected/controls/TopicList.tpl +++ b/demos/quickstart/protected/controls/TopicList.tpl @@ -106,8 +106,6 @@
Client-side Scripting
diff --git a/demos/quickstart/protected/controls/de/TopicList.tpl b/demos/quickstart/protected/controls/de/TopicList.tpl index 470927da..3c358b43 100755 --- a/demos/quickstart/protected/controls/de/TopicList.tpl +++ b/demos/quickstart/protected/controls/de/TopicList.tpl @@ -106,8 +106,6 @@
Client-side Scripting
diff --git a/demos/quickstart/protected/controls/es/TopicList.tpl b/demos/quickstart/protected/controls/es/TopicList.tpl index 62451700..ba5f83c4 100644 --- a/demos/quickstart/protected/controls/es/TopicList.tpl +++ b/demos/quickstart/protected/controls/es/TopicList.tpl @@ -103,8 +103,6 @@
Scripts del lado del cliente (Client-side Scripting)
diff --git a/demos/quickstart/protected/controls/fr/TopicList.tpl b/demos/quickstart/protected/controls/fr/TopicList.tpl index c37609ab..1959fcbc 100644 --- a/demos/quickstart/protected/controls/fr/TopicList.tpl +++ b/demos/quickstart/protected/controls/fr/TopicList.tpl @@ -101,8 +101,6 @@
Script côté client
diff --git a/demos/quickstart/protected/controls/id/TopicList.tpl b/demos/quickstart/protected/controls/id/TopicList.tpl index a35db55d..1f1f9403 100644 --- a/demos/quickstart/protected/controls/id/TopicList.tpl +++ b/demos/quickstart/protected/controls/id/TopicList.tpl @@ -102,8 +102,6 @@
Penaskahan sisi-Klien
diff --git a/demos/quickstart/protected/controls/ja/TopicList.tpl b/demos/quickstart/protected/controls/ja/TopicList.tpl index f24994e0..dc025b1a 100644 --- a/demos/quickstart/protected/controls/ja/TopicList.tpl +++ b/demos/quickstart/protected/controls/ja/TopicList.tpl @@ -102,8 +102,6 @@
クライアントサイドスクリプト
diff --git a/demos/quickstart/protected/controls/pl/TopicList.tpl b/demos/quickstart/protected/controls/pl/TopicList.tpl index a494d94e..c92962f9 100644 --- a/demos/quickstart/protected/controls/pl/TopicList.tpl +++ b/demos/quickstart/protected/controls/pl/TopicList.tpl @@ -102,8 +102,6 @@
Skrypty po stronie klienta
diff --git a/demos/quickstart/protected/controls/zh/TopicList.tpl b/demos/quickstart/protected/controls/zh/TopicList.tpl index 73e1d5a8..79293c18 100644 --- a/demos/quickstart/protected/controls/zh/TopicList.tpl +++ b/demos/quickstart/protected/controls/zh/TopicList.tpl @@ -101,8 +101,6 @@
客户端编程
diff --git a/demos/quickstart/protected/pages/ActiveControls/ActiveRatingList.page b/demos/quickstart/protected/pages/ActiveControls/ActiveRatingList.page index 7b6fb83d..fa0e25c4 100644 --- a/demos/quickstart/protected/pages/ActiveControls/ActiveRatingList.page +++ b/demos/quickstart/protected/pages/ActiveControls/ActiveRatingList.page @@ -1,6 +1,6 @@ -

TActiveRatingList

+

TActiveRatingList

diff --git a/demos/quickstart/protected/pages/ActiveControls/Introduction.page b/demos/quickstart/protected/pages/ActiveControls/Introduction.page index edc0b5bc..275da737 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Introduction.page +++ b/demos/quickstart/protected/pages/ActiveControls/Introduction.page @@ -9,7 +9,7 @@ A classic webpage can only transfer data back to the server using an http postba A common solution to this problem is the use of AJAX (Asynchronous JavaScript and XML) callbacks. After the first full page load, the web application can make subsequents requests using javascript. The callback requests are asynchronous, so the user can continue to interact with the page while the response is loading. The response contains a list of changes that will be applied to the page "on the fly", like replacing existing elements with new content or add some css style to an existing element.

-

Interacting with a page on callback

+

Interacting with a page on callback

PRADO has builtin support for AJAX callbacks in the form of Active Controls. These controls can trigger a callback request and have their properties (value, css style, attributes, ..) updated during a callback. @@ -28,7 +28,7 @@ public function onClick($sender, $param) } -

Active Controls (AJAX enabled Controls)

+

Active Controls (AJAX enabled Controls)

Active controls extends standard PRADO controls adding the ability to automatically update themselves on callbacks without the need of ad-hoc javascript calls. Active controls are reliant on a collection of javascript classes that gets added to the page automatically when needed.

diff --git a/demos/quickstart/protected/pages/Advanced/Scripts1.page b/demos/quickstart/protected/pages/Advanced/Scripts1.page deleted file mode 100755 index 96ab7760..00000000 --- a/demos/quickstart/protected/pages/Advanced/Scripts1.page +++ /dev/null @@ -1,96 +0,0 @@ - - -

Developer Notes for prototype.js

-This guide is based on the -Developer Notes for prototype.js by Sergio Pereira. - -

What is that?

-

-In case you haven't already used it, prototype.js is a - JavaScript library written by Sam Stephenson. - This amazingly well thought and well written piece of standards-compliant code takes a lot of - the burden associated with creating rich, highly interactive web pages that characterize the Web 2.0 off your back. -

- -

- If you tried to use this library recently, you probably noticed that documentation is not one - of its strongest points. As many other developers before me, I got my head around prototype.js by - reading the source code and experimenting with it. I thought it would be nice to take notes while - I learned and share with everybody else. -

-

- As you read the examples and the reference, developers familiar with the Ruby - programming language will notice an intentional similarity between Ruby's - built-in classes and many of the extensions implemented by this library. -

- - -

Using the $() function

-

- The $() function is a handy shortcut to the all-too-frequent document.getElementById() function - of the DOM. Like the DOM function, this one returns the element that has the id passed as an argument. -

- -

- Unlike the DOM function, though, this one goes further. You can pass more than one id and - $() will return an Array object with - all the requested elements. The example below should illustrate this. -

- -<com:TClientScript UsingClientScripts="prado" /> -
-

This is a paragraph

-
- -
-

This is another paragraph

-
- - - - - -
-

- Another nice thing about this function is that you can pass either the id string or the element object itself, - which makes this function very useful when creating other functions that can also take either form of argument. -

- -

Using the $F() function

- -

- The $F() function is a another welcome shortcut. It returns the value of any field input control, - like text boxes or drop-down lists. The function can take as argument either the element id or the element object itself. -

- - - - - - - -
diff --git a/demos/quickstart/protected/pages/Advanced/Scripts2.page b/demos/quickstart/protected/pages/Advanced/Scripts2.page deleted file mode 100755 index 5d88b065..00000000 --- a/demos/quickstart/protected/pages/Advanced/Scripts2.page +++ /dev/null @@ -1,253 +0,0 @@ - -

DOM Events and Javascript

- -

Basic event handling

- -

The syntax for working with events looks like the code below.

- - -Event.observe(element, name, observer, [useCapture]); - - -

Assuming for a moment that we want to observe when a link was clicked, -we could do the following:

- - -// <a id="clicker" href="http://foo.com">Click me</a> -Event.observe('clicker', 'click', function(event) -{ - alert('clicked!'); -}); - - -

If we wanted to get the element that fired the event, we'd do this:

- - -Event.observe('clicker', 'click', function(event) -{ - alert(Event.element(event)); -}); - - -

Observing keystrokes

- -

If we wanted to observe keystrokes for the entire document, we could do the following:

- - -Event.observe(document, 'keypress', function(event) -{ - if(Event.keyCode(event) == Event.KEY_TAB) - alert('Tab Pressed'); -}); - - -

And lets say we wanted to keep track of what has been typed :

- - -Event.observe('search', 'keypress', function(event) -{ - Element.update('search-results', $F(Event.element(event))); -}); - - -

Prototype defines properties inside the event object for some -of the more common keys, so feel free to dig around in Prototype to -see which ones those are.

- -

A final note on keypress events; If you'd like to detect a -left click you can use Event.isLeftClick(event).

- -

Getting the coordinates of the mouse pointer

- -

Drag and drop, dynamic element resizing, games, and -much more all require the ability to track the X and Y location of -the mouse. Prototype makes this fairly simple. The code below tracks -the X and Y position of the mouse and spits out those values into -an input box named mouse.

- - -Event.observe(document, 'mousemove', function(event) -{ - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; -}); - - -

If we wanted to observe the mouse location when it was -hovering over a certain element, we'd just change the document argument to -the id or element that was relevant.

- -

Stopping Propagation

- -

Event.stop(event) will stop the propagation of an event .

- -

Events, Binding, and Objects

- -

Everything has been fairly straight forward so far, but things -start getting a little trickier when you need to work with events in -and object-oriented environment. You have to deal with binding and funky -looking syntax that might take a moment to get your head around.

- -

Lets look at some code so you can get a better understanding of what I'm talking about.

- -EventDispenser = Class.create(); -EventDispenser.prototype = -{ - initialize: function(list) - { - this.list = list; - - // Observe clicks on our list items - $$(this.list + " li").each(function(item) - { - Event.observe(item, 'click', this.showTagName.bindEvent(this)); - }.bind(this)); - - // Observe when a key on the keyboard is pressed. - // In the observer, we check for - // the tab key and alert a message if it is pressed. - Event.observe(document, 'keypress', this.onKeyPress.bindEvent(this)); - - // Observe our fake live search box. When a user types - // something into the box, the observer will take that - // value(-1) and update our search-results div with it. - Event.observe('search', 'keypress', this.onSearch.bindEvent(this)); - - Event.observe(document, 'mousemove', this.onMouseMove.bindEvent(this)); - }, - - // Arbitrary functions to respond to events - showTagName: function(event) - { - alert(Event.element(event).tagName); - }, - - onKeyPress: function(event) - { - var code = event.keyCode; - if(code == Event.KEY_TAB) - alert('Tab key was pressed'); - }, - - onSearch: function(event) - { - Element.update('search-results', $F(Event.element(event))); - }, - - onMouseMove: function(event) - { - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; - } -} - -

Whoa! What's going on here? Well, we've defined our a -custom class EventDispenser. We're going to be using this class -to setup events for our document. Most of this code is a -rewrite of the code we looked at earlier except this time, we -are working from inside an object.

- -

Looking at the initialize method, we can really see how -things are different now. Take a look at the code below:

- -// Observe clicks on our list items -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagName.bindEvent(this)); -}.bind(this)); - - -

We've got iterators, binding and all sorts of stuff going on. -Lets break down what this chunk of code is doing.

- -

First we are hunting for a collection of elements based on -it's CSS selector. This uses the Prototype selector function $$(). -After we've found the list items we are dealing with we send -those into an each iteration where we will add our observers.

- - -Event.observe(item, 'click', this.showTagName.bindEvent(this)); - - -

Now looking at the code above, you'll notice the bindEvent function. -This takes the method before it showTagName and treats it as the -method that will be triggered when, in this case, -someone clicks one of our list items.

- -

You'll also notice we pass this as an argument to the bindEvent function. -This simply allows us to reference the object in context EventDispenser -inside our function showTagName(event). If the showTagName function -requires additional parameters, you can attach them to the later parameters of bindEvent. For example

- -this.showTagName.bindEvent(this, param1, param2); - -//where the showTagName function is defined as -showTime : function (event, param1, param2) { ... } - - -

Moving on, you'll see bind(this) attached to our iterator function. -This really has nothing to do with events, it is only here to allow me to -use this inside the iterator. If we did not use bind(this), I could not -reference the method showTagName inside the iterator.

- -

Ok, so we'll move on to looking at our methods that actually get -called when an event occurs. Since we've been dealing with showTagName, lets look at it.

- - -showTagName: function(event) -{ - alert(Event.element(event).tagName); -} - - -

As you can see, this function accepts one argument--the event. -In order for us to get the element which fired the event we need to -pass that argument to Event.element. Now we can manipulate it at will.

- -

This covers the most confusing parts of our code. The text above is also -relevant to the remaining parts of our code. If there is anything about -this you don't understand, feel free to ask questions in the forum.

- -

Removing Event Listeners

- -

This one threw me for a loop the first time I tried to use it. -I tried something similar to what I did in the Event.observe -call with the exception of using stopObserving, but nothing seemed -to change. In other words, the code below does NOT work.

- - -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagName); -}.bind(this)); - - -

What's the deal here? The reason this does not work is because there -is no pointer to the observer. This means that when we passed this.showTagName -in the Event.observe method before hand, we passed it as an -anonymous function. We can't reference an anonymous function -because it simply does not have a pointer.

- -

So how do we get the job done? All we need to do is give the -observing function a pointer, or the jargon free version: Set a variable -that points to this.showTagName. Ok, lets change our code a bit.

- - -this.showTagObserver = this.showTagName.bindEvent(this); - -// Observe clicks on our list items -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagObserver); -}.bind(this)); - - -

Now we can remove the event listeners from our list like this:

- -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagObserver); -}.bind(this)); - - -
diff --git a/demos/quickstart/protected/pages/Advanced/Scripts3.page b/demos/quickstart/protected/pages/Advanced/Scripts3.page index 3f41abe1..b937e274 100755 --- a/demos/quickstart/protected/pages/Advanced/Scripts3.page +++ b/demos/quickstart/protected/pages/Advanced/Scripts3.page @@ -19,22 +19,31 @@ $this->getPage()->getClientScript()->registerPradoScript("effects"); The available packaged libraries included in Prado are
    -
  • prado : basic PRADO javascript framework based on Prototype
  • -
  • effects : visual effects from script.aculo.us
  • -
  • ajax : ajax and callback related based on Prototype
  • -
  • validator : validation
  • +
  • jquery : jQuery javascript framework
  • +
  • prado : basic PRADO javascript framework based on jQuery
  • +
  • bootstrap : Bootstrap front-end framework
  • +
  • effects : visual effects based on jQueryUI
  • +
  • ajax : ajax and callback related based on jQuery
  • +
  • validator : widgets validation
  • logger : javascript logger and object browser
  • -
  • datepicker : datepicker control
  • -
  • colorpicker : colorpicker control
  • +
  • datepicker : TDatepicker control
  • +
  • colorpicker : TColorPicker control
  • dragdrop : basic support for "drag and drop" control
  • dragdropextra : extra support for "drag and drop" controls
  • -
  • slider : slider control
  • +
  • slider : TSlider control
  • keyboard : software keyboard control
  • -
  • tabpanel : tabpanel control
  • +
  • tabpanel : TTabPanel control
  • +
  • inlineeditor : TInPlaceTextBox. control
  • activedatepicker : ajax version of the datepicker control
  • activefileupload : ajax version of the fileupload control
  • -
  • accordion : accordion control
  • -
  • htmlarea : tinymce control
  • +
  • accordion : TAccordion control
  • +
  • ratings : TRatingList control
  • +
  • htmlarea : tinyMCE version 3 editor
  • +
  • htmlarea4 : tinyMCE version 4 editor
  • +
  • prototype : prototype javascript framework (only for compatibility with old custom controls)
  • +
  • dragdrop : compatibility package for old, prototype-based drag&drop controls
  • +
  • dragdropextra : compatiblity package for old, prototype-based drag&drop controls
  • +
  • autocomplete : compatibility package for prototype-based TAutoComplete control

The dependencies for each library are automatically resolved. Components diff --git a/demos/quickstart/protected/pages/Advanced/es/Scripts1.page b/demos/quickstart/protected/pages/Advanced/es/Scripts1.page deleted file mode 100755 index 96ab7760..00000000 --- a/demos/quickstart/protected/pages/Advanced/es/Scripts1.page +++ /dev/null @@ -1,96 +0,0 @@ - - -

Developer Notes for prototype.js

-This guide is based on the -Developer Notes for prototype.js by Sergio Pereira. - -

What is that?

-

-In case you haven't already used it, prototype.js is a - JavaScript library written by Sam Stephenson. - This amazingly well thought and well written piece of standards-compliant code takes a lot of - the burden associated with creating rich, highly interactive web pages that characterize the Web 2.0 off your back. -

- -

- If you tried to use this library recently, you probably noticed that documentation is not one - of its strongest points. As many other developers before me, I got my head around prototype.js by - reading the source code and experimenting with it. I thought it would be nice to take notes while - I learned and share with everybody else. -

-

- As you read the examples and the reference, developers familiar with the Ruby - programming language will notice an intentional similarity between Ruby's - built-in classes and many of the extensions implemented by this library. -

- - -

Using the $() function

-

- The $() function is a handy shortcut to the all-too-frequent document.getElementById() function - of the DOM. Like the DOM function, this one returns the element that has the id passed as an argument. -

- -

- Unlike the DOM function, though, this one goes further. You can pass more than one id and - $() will return an Array object with - all the requested elements. The example below should illustrate this. -

- -<com:TClientScript UsingClientScripts="prado" /> -
-

This is a paragraph

-
- -
-

This is another paragraph

-
- - - - - -
-

- Another nice thing about this function is that you can pass either the id string or the element object itself, - which makes this function very useful when creating other functions that can also take either form of argument. -

- -

Using the $F() function

- -

- The $F() function is a another welcome shortcut. It returns the value of any field input control, - like text boxes or drop-down lists. The function can take as argument either the element id or the element object itself. -

- - - - - - - -
diff --git a/demos/quickstart/protected/pages/Advanced/es/Scripts2.page b/demos/quickstart/protected/pages/Advanced/es/Scripts2.page deleted file mode 100755 index 5d88b065..00000000 --- a/demos/quickstart/protected/pages/Advanced/es/Scripts2.page +++ /dev/null @@ -1,253 +0,0 @@ - -

DOM Events and Javascript

- -

Basic event handling

- -

The syntax for working with events looks like the code below.

- - -Event.observe(element, name, observer, [useCapture]); - - -

Assuming for a moment that we want to observe when a link was clicked, -we could do the following:

- - -// <a id="clicker" href="http://foo.com">Click me</a> -Event.observe('clicker', 'click', function(event) -{ - alert('clicked!'); -}); - - -

If we wanted to get the element that fired the event, we'd do this:

- - -Event.observe('clicker', 'click', function(event) -{ - alert(Event.element(event)); -}); - - -

Observing keystrokes

- -

If we wanted to observe keystrokes for the entire document, we could do the following:

- - -Event.observe(document, 'keypress', function(event) -{ - if(Event.keyCode(event) == Event.KEY_TAB) - alert('Tab Pressed'); -}); - - -

And lets say we wanted to keep track of what has been typed :

- - -Event.observe('search', 'keypress', function(event) -{ - Element.update('search-results', $F(Event.element(event))); -}); - - -

Prototype defines properties inside the event object for some -of the more common keys, so feel free to dig around in Prototype to -see which ones those are.

- -

A final note on keypress events; If you'd like to detect a -left click you can use Event.isLeftClick(event).

- -

Getting the coordinates of the mouse pointer

- -

Drag and drop, dynamic element resizing, games, and -much more all require the ability to track the X and Y location of -the mouse. Prototype makes this fairly simple. The code below tracks -the X and Y position of the mouse and spits out those values into -an input box named mouse.

- - -Event.observe(document, 'mousemove', function(event) -{ - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; -}); - - -

If we wanted to observe the mouse location when it was -hovering over a certain element, we'd just change the document argument to -the id or element that was relevant.

- -

Stopping Propagation

- -

Event.stop(event) will stop the propagation of an event .

- -

Events, Binding, and Objects

- -

Everything has been fairly straight forward so far, but things -start getting a little trickier when you need to work with events in -and object-oriented environment. You have to deal with binding and funky -looking syntax that might take a moment to get your head around.

- -

Lets look at some code so you can get a better understanding of what I'm talking about.

- -EventDispenser = Class.create(); -EventDispenser.prototype = -{ - initialize: function(list) - { - this.list = list; - - // Observe clicks on our list items - $$(this.list + " li").each(function(item) - { - Event.observe(item, 'click', this.showTagName.bindEvent(this)); - }.bind(this)); - - // Observe when a key on the keyboard is pressed. - // In the observer, we check for - // the tab key and alert a message if it is pressed. - Event.observe(document, 'keypress', this.onKeyPress.bindEvent(this)); - - // Observe our fake live search box. When a user types - // something into the box, the observer will take that - // value(-1) and update our search-results div with it. - Event.observe('search', 'keypress', this.onSearch.bindEvent(this)); - - Event.observe(document, 'mousemove', this.onMouseMove.bindEvent(this)); - }, - - // Arbitrary functions to respond to events - showTagName: function(event) - { - alert(Event.element(event).tagName); - }, - - onKeyPress: function(event) - { - var code = event.keyCode; - if(code == Event.KEY_TAB) - alert('Tab key was pressed'); - }, - - onSearch: function(event) - { - Element.update('search-results', $F(Event.element(event))); - }, - - onMouseMove: function(event) - { - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; - } -} - -

Whoa! What's going on here? Well, we've defined our a -custom class EventDispenser. We're going to be using this class -to setup events for our document. Most of this code is a -rewrite of the code we looked at earlier except this time, we -are working from inside an object.

- -

Looking at the initialize method, we can really see how -things are different now. Take a look at the code below:

- -// Observe clicks on our list items -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagName.bindEvent(this)); -}.bind(this)); - - -

We've got iterators, binding and all sorts of stuff going on. -Lets break down what this chunk of code is doing.

- -

First we are hunting for a collection of elements based on -it's CSS selector. This uses the Prototype selector function $$(). -After we've found the list items we are dealing with we send -those into an each iteration where we will add our observers.

- - -Event.observe(item, 'click', this.showTagName.bindEvent(this)); - - -

Now looking at the code above, you'll notice the bindEvent function. -This takes the method before it showTagName and treats it as the -method that will be triggered when, in this case, -someone clicks one of our list items.

- -

You'll also notice we pass this as an argument to the bindEvent function. -This simply allows us to reference the object in context EventDispenser -inside our function showTagName(event). If the showTagName function -requires additional parameters, you can attach them to the later parameters of bindEvent. For example

- -this.showTagName.bindEvent(this, param1, param2); - -//where the showTagName function is defined as -showTime : function (event, param1, param2) { ... } - - -

Moving on, you'll see bind(this) attached to our iterator function. -This really has nothing to do with events, it is only here to allow me to -use this inside the iterator. If we did not use bind(this), I could not -reference the method showTagName inside the iterator.

- -

Ok, so we'll move on to looking at our methods that actually get -called when an event occurs. Since we've been dealing with showTagName, lets look at it.

- - -showTagName: function(event) -{ - alert(Event.element(event).tagName); -} - - -

As you can see, this function accepts one argument--the event. -In order for us to get the element which fired the event we need to -pass that argument to Event.element. Now we can manipulate it at will.

- -

This covers the most confusing parts of our code. The text above is also -relevant to the remaining parts of our code. If there is anything about -this you don't understand, feel free to ask questions in the forum.

- -

Removing Event Listeners

- -

This one threw me for a loop the first time I tried to use it. -I tried something similar to what I did in the Event.observe -call with the exception of using stopObserving, but nothing seemed -to change. In other words, the code below does NOT work.

- - -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagName); -}.bind(this)); - - -

What's the deal here? The reason this does not work is because there -is no pointer to the observer. This means that when we passed this.showTagName -in the Event.observe method before hand, we passed it as an -anonymous function. We can't reference an anonymous function -because it simply does not have a pointer.

- -

So how do we get the job done? All we need to do is give the -observing function a pointer, or the jargon free version: Set a variable -that points to this.showTagName. Ok, lets change our code a bit.

- - -this.showTagObserver = this.showTagName.bindEvent(this); - -// Observe clicks on our list items -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagObserver); -}.bind(this)); - - -

Now we can remove the event listeners from our list like this:

- -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagObserver); -}.bind(this)); - - -
diff --git a/demos/quickstart/protected/pages/Advanced/id/Scripts1.page b/demos/quickstart/protected/pages/Advanced/id/Scripts1.page deleted file mode 100755 index 51535de1..00000000 --- a/demos/quickstart/protected/pages/Advanced/id/Scripts1.page +++ /dev/null @@ -1,86 +0,0 @@ - - -

Catatan Pengembang untuk prototype.js

-Bimbingan ini didasarkan pada -Catatan Pengembang untuk prototype.js oleh Sergio Pereira. - -

Apa itu?

-

-Dalam hal Anda tidak pernah menggunakannya, prototype.js adalah librari - JavaScript yang ditulis oleh Sam Stephenson. - Pemikiran yang hebat ini dan kode sesuai-standar yang ditulis dengan baik mengambil banyak beban terkait dengan pembuatan halaman web sangat interaktif dan kaya yang mengkarakterkan Web 2.0 di belakang Anda. -

- -

- Jika Anda baru saja mencoba menggunakan librari ini, Anda mungkin mencatat bahwa dokumentasi bukanlah salah satu titik yang terkuat. Seperti banyak pengembang lain sebelum saya, saya mempelajari prototype.js dengan membaca kode sumber dan melakukan percobaan denganya. Saya pikir akan baik jika mengambil catatan selama saya mempelajari dan berbagi dengan orang lain. -

-

- Setelah Anda membaca contoh dan referensi, para pengembang yang terbiasa dengan bahasa pemrograman Ruby akan mencatat kesamaan maksud antara kelas built-in Ruby dan banyak ekstensi diimplementasikan oleh librari ini. -

- - -

Menggunakan fungsi $()

-

- Fungsi $() adalah jalan pintas yang siap digunakan untuk fungsi yang semua-terlalu-sering document.getElementById() terhadap DOM. Seperti fungsi DOM, fungsi ini mengembalikan elemen yang id-nya dikirimkan sebagai sebuah argumen. -

- -

- Tidak seperti fungsi DOM, bagaimanapun juga, yang satu ini melampauinya. Anda dapat mengirimkan lebih dari satu id dan - $() akan mengembalikan obyek Array dengan semua elemen yang diminta. Contoh di bawah seharunya menggambarkan ini. -

- -<com:TClientScript UsingClientScripts="prado" /> -
-

This is a paragraph

-
- -
-

This is another paragraph

-
- - - - - -
-

- Hal baik lainnya dari fungsi ini adalah bahwa Anda bisa mengirimkan baik string id ataupun elemen obyek itu sendiri, yang menjadikan fungsi ini sangat berguna ketika membuat fungsi lain yang juga mengambil bentuk argumen. -

- -

Menggunakan fungsi $F()

- -

- Fungsi $F() adalah jalan pintas penyambutan lainnya. Ia mengembalikan nilai dari setiap kontrol input field, seperti kotak teks atau daftar drop-down. Fungsi bisa diambil sebagai argumen baik elemen id ataupun elemen obyek itu sendiri. -

- - - - - - - -
diff --git a/demos/quickstart/protected/pages/Advanced/id/Scripts2.page b/demos/quickstart/protected/pages/Advanced/id/Scripts2.page deleted file mode 100755 index 80277628..00000000 --- a/demos/quickstart/protected/pages/Advanced/id/Scripts2.page +++ /dev/null @@ -1,214 +0,0 @@ - -

Event DOM dan Javascript

- -

Penanganan event dasar

- -

Sintaks untuk bekerja dengan event terlihat seperti kode di bawah.

- - -Event.observe(element, name, observer, [useCapture]); - - -

Menganggap untuk saat ini kita ingin mengamati sebuah link yang diklik, kita dapat melakukan yang berikut:

- - -// <a id="clicker" href="http://foo.com">Click me</a> -Event.observe('clicker', 'click', function(event) -{ - alert('clicked!'); -}); - - -

Jika kita menginginkan untuk mendapatkan elemen yang memicu event, kita melakukan ini:

- - -Event.observe('clicker', 'click', function(event) -{ - alert(Event.element(event)); -}); - - -

Mengamati tekanan tombol

- -

Jika kita ingin mengamati tekanan tombol untuk seluruh dokumen, kita dapat melakukan yang berikut:

- - -Event.observe(document, 'keypress', function(event) -{ - if(Event.keyCode(event) == Event.KEY_TAB) - alert('Tab Pressed'); -}); - - -

Dan katakanlah kita ingin melacak apa yang telak diketikan:

- - -Event.observe('search', 'keypress', function(event) -{ - Element.update('search-results', $F(Event.element(event))); -}); - - -

Prototipe mendefinisikan properti di dalam obyek event untuk beberapa dari tombol yang lebih umum, maka jangan ragu-ragu untuk mencari di sekitar Prototype guna melihat yang mana saja itu.

- -

Catatan terakhir pada event tekanan tombol; Jika Anda ingin mendeteksi klik kiri, Anda bisa menggunakan Event.isLeftClick(event).

- -

Mendapatkan koordinat dari penunjuk mouse

- -

Tarik dan jatuhkan, pengukuran ulang elemen dinamis, permainan, dan lebih banyak lagi, semuanya memerlukan kemampuan untuk melacak lokasi X dan Y dari mouse. Prototipe menjadikan hal ini cukup sederhana. Kode di bawah melacak posisi X dan Y dari mouse dan memindahkan nilainya ke dalam kotak input bernama mouse.

- - -Event.observe(document, 'mousemove', function(event) -{ - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; -}); - - -

Jika kita ingin mengamati lokasi mouse saat ia melewati elemen tertentu, cukup ubah argumen dokumen ke id atau elemen yang relevan.

- -

Menghentikan Propagasi

- -

Event.stop(event) akan menghentikan propagasi sebuah event .

- -

Event, Penyatuan, dan Obyek

- -

Sejauh ini semuanya sudah jelas, tapi sesuatu mulai menjadi sedikit lebih rumit ketika Anda perlu bekerja dengan event dalam lingkungan obyek-terorientasi. Anda harus berhadapan dengan penyatuan dan sintaks yang terlihat aneh yang memerlukan beberapa waktu bagi Anda untuk mengetahuinya.

- -

Mari kita lihat pada beberapa kode agar Anda bisa mendapatkan pengertian yang lebih baik atas apa yang sedang saya bicarakan.

- -EventDispenser = Class.create(); -EventDispenser.prototype = -{ - initialize: function(list) - { - this.list = list; - - // Amati klik pada item list kita - $$(this.list + " li").each(function(item) - { - Event.observe(item, 'click', this.showTagName.bindEvent(this)); - }.bind(this)); - - // Amati saat tombol pada keyboard ditekan. - // Dalam pengamat, kita memeriksa - // tombol tab dan memunculkan pesan jika ditekan. - Event.observe(document, 'keypress', this.onKeyPress.bindEvent(this)); - - // Amati kotak pencarian kita yang palsu. Ketika pengguna mengetik - // sesuatu ke dalam kotak, pengamat akan mengambil nilai (-1) itu - // dan memutakhirkan hasil pencarian div dengannya. - Event.observe('search', 'keypress', this.onSearch.bindEvent(this)); - - Event.observe(document, 'mousemove', this.onMouseMove.bindEvent(this)); - }, - - // Fungsi bebas untuk merespon event - showTagName: function(event) - { - alert(Event.element(event).tagName); - }, - - onKeyPress: function(event) - { - var code = event.keyCode; - if(code == Event.KEY_TAB) - alert('Tab key was pressed'); - }, - - onSearch: function(event) - { - Element.update('search-results', $F(Event.element(event))); - }, - - onMouseMove: function(event) - { - $('mouse').value = "X: " + Event.pointerX(event) + - "px Y: " + Event.pointerY(event) + "px"; - } -} - -

Wah! Apa yang terjadi di sini? Kita telah mendefinisikan kelas kustom kita EventDispenser. Kita akan menggunakan kelas ini untuk menyiapkan event untuk dokumenkita. Banyak dari kode ini ditulis ulang yang kita lihat di awal kecuali kali ini, kita bekerja dari dalam sebuah obyek.

- -

Melihat metode initialize, sebenarnya kita dapat melihat bagaimana sesuatu menjadi berbeda sekarang. Lihat kode di bawah ini:

- -// Observe clicks on our list items -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagName.bindEvent(this)); -}.bind(this)); - - -

Kita mendapatkan iterator, penyatuan dan semua hal lainnya. Mari kita rinci apa yang dikerjakan kode ini.

- -

Pertama kita memburu koleksi elemen berdasarkan selektor CSS. Ini menggunakan fungsi selektor Prototipe $$(). -Setelah kita menemukan daftar item kita berhadapan dengan apa yang kita kirim ke dalam setiap iterasi di mana kita akan menambahkan pengamat kita.

- - -Event.observe(item, 'click', this.showTagName.bindEvent(this)); - - -

Sekarang, melihat kode di atas, Anda akan mencatat fungsi bindEvent. Ini mengambil metode sebelumnya showTagName dan memperlakukannya sebagai metode yang akan dipicu ketika seseorang mengklik salah satu dari item daftar kita.

- -

Anda juga akan mencatat bahwa kita mengirimkan ini sebagai argumen ke fungsi bindEvent. -Ini membolehkan kita untuk mereferensi obyek dalam konteks EventDispenser -di dalam fungsi showTagName(event) kita. Jika fungsi showTagName memerlukan parameter tambahan, Anda melampirkannya ke parameter terakhir dari bindEvent. Sebagai contoh

- -this.showTagName.bindEvent(this, param1, param2); - -//di mana fungsi showTagName didefinisikan seperti -showTime : function (event, param1, param2) { ... } - - -

Selanjutnya, Anda akan melihat bind(this) yang dilampirkan ke fungsi iterator. -Ini sama sekali tidak berkaitan dengan event, ia berada di sini untuk membolehkan saya menggunakan this di dalam iterator. Jika kita tidak menggunakan bind(this), saya tidak bisa mereferensi metode showTagName di dalam iterator.

- -

Ok, kita berlanjut untuk melihat metode kita yang sebenarnya dipanggil saat terjadi event. Karena kita sudah berhadapan dengan showTagName, mari kita lihat itu.

- - -showTagName: function(event) -{ - alert(Event.element(event).tagName); -} - - -

Seperti yang Anda lihat, fungsi ini menerima satu argumen--event. -Agar kita mendapatkan elemen yang memicu event kita perlu mengirimkan argumen ke Event.element. Sekarang kita dapat memanipulasinya kapan saja.

- -

Ini mencakup bagian yang paling membingungkan dari kode kita. Teks di atas juga relevan untuk bagian sisa dari kode kita. Jika ada sesuatu mengenai ini yang tidak Anda mengerti, jangan ragu-ragu untuk mengajukan pertanyaan dalam forum.

- -

Menghapus Pendengar Event

- -

Yang satu ini melontarkan saya dari lingkaran untuk pertama kali saya mencoba menggunakannya. -Saya mencoba sesuatu yang mirip dengan apa yang saya lakukan dalam pemanggilan Event.observe dengan kekecualian penggunaan stopObserving, tapi tidak ada yang berubah. Dengan kata lain, kode di bawah ini TIDAK bekerja.

- - -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagName); -}.bind(this)); - - -

Apa yang terjadi di sini? Alasan ini tidak bekerja karena tidak ada penunjuk ke pengamat. Ini berarti bahwa ketika kita mengirimkan this.showTagName dalam metode Event.observe sebelumnya, kita mengirimkannya sebagai fungsi anonim. Kita tidak bisa mereferensi fungsi anonim karena ia tidak mempunyai penunjuk.

- -

Lalu bagaimana kita yakin pekerjaan diselesaikan? Semua yang kita perlukan adalah memberikan fungsi mengamati penunjuk, atau kelompok versi bebas: Setel variabel yang mengarah ke this.showTagName. Ok, mari kita ubah kode kita sedikit.

- - -this.showTagObserver = this.showTagName.bindEvent(this); - -// Amati klik pada item list kita -$$(this.list + " li").each(function(item) -{ - Event.observe(item, 'click', this.showTagObserver); -}.bind(this)); - - -

Sekarang kita bisa menghapus pendengar event dari daftar kita seperti ini:

- -$$(this.list + " li").each(function(item) -{ - Event.stopObserving(item, 'click', this.showTagObserver); -}.bind(this)); - - -
diff --git a/demos/quickstart/protected/pages/Controls/HtmlArea4.page b/demos/quickstart/protected/pages/Controls/HtmlArea4.page index 1fa33424..17c87e18 100755 --- a/demos/quickstart/protected/pages/Controls/HtmlArea4.page +++ b/demos/quickstart/protected/pages/Controls/HtmlArea4.page @@ -1,6 +1,6 @@ -

THtmlArea4

+

THtmlArea4

diff --git a/demos/quickstart/protected/pages/Controls/Markdown.page b/demos/quickstart/protected/pages/Controls/Markdown.page index d7cc00c6..0285ed32 100644 --- a/demos/quickstart/protected/pages/Controls/Markdown.page +++ b/demos/quickstart/protected/pages/Controls/Markdown.page @@ -1,6 +1,6 @@ -

TMarkdown

+

TMarkdown

diff --git a/demos/quickstart/protected/pages/Database/ViewsArUpdate.page b/demos/quickstart/protected/pages/Database/ViewsArUpdate.page index 5dd084c4..2df1d3d7 100644 --- a/demos/quickstart/protected/pages/Database/ViewsArUpdate.page +++ b/demos/quickstart/protected/pages/Database/ViewsArUpdate.page @@ -1,6 +1,6 @@

Views - AR Classes Update

- +

Usually when you use Active Records Classes to interact with your Data Base you also build some proper views to handle them. To save every element of your views in your Data Base @@ -9,9 +9,9 @@ Thats why Prado offers an automatic mechanism to update your views from your AR Classes and vice versa.

-

Updating views from AR Classes

+

Updating views from AR Classes

-

Instead of assign each attribute in your AR Class to your view controls like this:

+

Instead of assign each attribute in your AR Class to your view controls like this:

$student = AR_Student::finder()->findByPk(1); $this->name->Text = $student->name; @@ -20,7 +20,7 @@ $this->gender->Text = $student->gender; $this->average->Text = $student->average; -

You can do the same as follows:

+

You can do the same as follows:

$student = AR_Student::finder()->findByPk(1); @@ -28,8 +28,8 @@ $this->tryToUpdateView($student); -

Updating AR Classes from views

-

Instead of assign each attribute in your views to your AR Classes like this:

+

Updating AR Classes from views

+

Instead of assign each attribute in your views to your AR Classes like this:

$student = new AR_Student(); $student->name = $this->name->Text; @@ -39,7 +39,7 @@ $student->average = $this->average->Text; $student->save(); -

You can do the same as follows:

+

You can do the same as follows:

$student = new AR_Student(); diff --git a/demos/quickstart/protected/pages/Fundamentals/Pages.page b/demos/quickstart/protected/pages/Fundamentals/Pages.page index 58f4f06d..3e03a24c 100755 --- a/demos/quickstart/protected/pages/Fundamentals/Pages.page +++ b/demos/quickstart/protected/pages/Fundamentals/Pages.page @@ -15,7 +15,7 @@ A form submission is called postback if the submission is made to the pag TPage has a IsPostBack property exposing whether the current request being handled is the first request for this page or the consequence of a postback.

-

CallBack

+

CallBack

A callback is a special form submission that, instead of requiring a full page reload on the browser, gets executed in the background through an ajax call. So, a callback is considered a postback too, but not vice versa.
diff --git a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page index 3619d3d9..9e919212 100644 --- a/demos/quickstart/protected/pages/GettingStarted/CommandLine.page +++ b/demos/quickstart/protected/pages/GettingStarted/CommandLine.page @@ -110,22 +110,22 @@ PostRecord#1

-

Creating Active Record Classes

-

+

Creating Active Record Classes

+

In the blog demo project, we need to create two Active Record classes, UserRecord and PostRecord, to represent data records in the users and posts tables, respectively. Active Record classes must extend from the base class ActiveRecord, and must define property names that matches with the field names of the corresponding table.

-

+

To better organize our directories, we create a new directory protected/database to hold the class files. We also modify our application configuration by inserting the following lines. It is equivalent to adding the directory protected/database to PHP include_path, which allows us to use the classes without explicitly including them.

- + -

+

At the prompt, enter the following two commands to create UserRecord and PostRecord classes:

@@ -135,7 +135,7 @@ At the prompt, enter the following two commands to create UserRecord an >> generate posts Application.database.PostRecord
-

+

Here we used the namespace format again to specify the classes to be created. The path Application.database.UserRecord indicates that we want the UserRecord class file to be protected/database/UserRecord.php.

diff --git a/demos/quickstart/protected/pages/GettingStarted/Installation.page b/demos/quickstart/protected/pages/GettingStarted/Installation.page index 956f53c2..f59eed70 100755 --- a/demos/quickstart/protected/pages/GettingStarted/Installation.page +++ b/demos/quickstart/protected/pages/GettingStarted/Installation.page @@ -13,7 +13,7 @@ The minimum requirement by PRADO is that the Web server support PHP 5.3.3. PRADO PRADO can be installed as a standalone package or using composer

-

Standalone package

+

Standalone package

  1. Go to pradosoft.com to grab the latest version of PRADO.
  2. Unpack the PRADO release file to a Web-accessible directory. @@ -28,7 +28,7 @@ If you encounter any problems with the demo applications, please use the PRADO r

    -

    Composer install

    +

    Composer install

    1. If you don't have installed composer already, install it globally: diff --git a/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page index e2378ed5..7e630488 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page +++ b/demos/quickstart/protected/pages/GettingStarted/Upgrading32.page @@ -1,6 +1,6 @@ -

      Upgrading from v3.2

      +

      Upgrading from v3.2

      @@ -17,7 +17,7 @@ We summarize in the following the most significant changes in v3.3 to help devel

      -

      Basic Prototype to jQuery javascript porting

      +

      Basic Prototype to jQuery javascript porting

      The number one rule on writing jQuery javascript code is to read the jQuery documentation. Porting code from Prototype to jQuery needs some effort: here's a basic lookup table to port existing code:

      @@ -168,7 +168,7 @@ The number one rule on writing jQuery javascript code is to read the PRADO specific code changes

      PRADO Porting prado to jQuery some method signatures has changed, or have been adapted: @@ -207,7 +207,7 @@ Porting prado to jQuery some method signatures has changed, or have been adapted -

      Specific controls changes

      +

      Specific controls changes

      Some Prado controls were based on specific extensions of the Prototype + Scriptaculous javascript framework, and they have been deprecated now that jQuery has become the primary js framework in PRADO. PRADO 3.3 introduces jQuery-based counterpart for these controls and encourage everyone to port their code to the new controls, but the old controls are still supposed to work with some minor annoyance: diff --git a/demos/quickstart/protected/pages/GettingStarted/Wsat.page b/demos/quickstart/protected/pages/GettingStarted/Wsat.page index 3d07e6f2..a76ca163 100644 --- a/demos/quickstart/protected/pages/GettingStarted/Wsat.page +++ b/demos/quickstart/protected/pages/GettingStarted/Wsat.page @@ -1,5 +1,5 @@ -

      Web Site Administration Tool

      +

      Web Site Administration Tool

      Web Site Administration Tool (WSAT) is a development tool which allows you to perform several tedious tasks of a PRADO project in a GUI fashion. Its inspired in both Asp.Net - Web Site Administration Tool and Yii's Gii. @@ -12,12 +12,12 @@

      -

      Requirements

      +

      Requirements

      To use WSAT, you need to add in your project configuration file: application.xml, in the services section the wsat service like follows: - + ... @@ -25,7 +25,7 @@

      -

      Usage

      +

      Usage

      Then you are ready to go to: http://localhost/yoursite/index.php?wsat=TWsatLogin and doing so you should see the following page: @@ -36,7 +36,7 @@ is part of a basic security system to avoid undesirable persons to use this tool.

      -

      Active Record classes generation

      +

      Active Record classes generation

      In order to generate AR classes you need to go to: http://localhost/divermania/index.php?wsat=TWsatGenerateAR by clicking the proper links in the welcome page. Then you should see the following page: diff --git a/demos/quickstart/protected/pages/JuiControls/Home.page b/demos/quickstart/protected/pages/JuiControls/Home.page index 7c0c065f..f997e573 100644 --- a/demos/quickstart/protected/pages/JuiControls/Home.page +++ b/demos/quickstart/protected/pages/JuiControls/Home.page @@ -1,9 +1,9 @@ -

      Jui Controls (jQuery UI)

      +

      Jui Controls (jQuery UI)

      Jui controls are the PRADO port of the standard jQuery UI widgets. They can be used as standard Active Controls, but will automatically load the needed jQuery-UI javascript libraries.

      -

      Options

      +

      Options

      The Options property of PRADO Jui controls is used to pass options to the underlying javascript object. Each subproperty set on Options will be translated to a javascript property added to the object. The complete list of options available for each widget is availble at jQuery-UI's API Documentation.

      @@ -24,7 +24,7 @@ jQuery-UI's Resizable adds an handl />
      -

      Events

      +

      Events

      jQuery-UI widgets offers a lot of events that PRADO can hook up and trasmit to the serverside using a callback request. Event available for PRADO Jui controls inherits their names from their jQuery-UI counterparts, prefixed with "On". Jui controls doesn't make use of the AutoPostback property anymore, but only triggers a callback when an event handler is associated to the corresponding event. @@ -42,7 +42,7 @@ jQuery's Draggable allows a target /> -

      PRADO Jui interactions controls

      +

      PRADO Jui interactions controls

      Jui interactions adds basic mouse-based interactions to elements like moving, resizing or sorting. PRADO Jui interactions controls applies there interactions to a TActivePanel For informations of the specific options of each interaction, follow jQuery-UI Interaction API Documentation for the specific interaction. @@ -74,7 +74,7 @@ For informations of the specific options of each interaction, follow jQuery-UI I

    2. -

      PRADO Jui widgets controls

      +

      PRADO Jui widgets controls

      • TJuiProgressbar diff --git a/demos/quickstart/protected/pages/JuiControls/Interactions.page b/demos/quickstart/protected/pages/JuiControls/Interactions.page index 2b48da68..b2be141f 100644 --- a/demos/quickstart/protected/pages/JuiControls/Interactions.page +++ b/demos/quickstart/protected/pages/JuiControls/Interactions.page @@ -1,12 +1,12 @@ -

        Jui interactions controls

        +

        Jui interactions controls

        Jui interactions adds basic mouse-based interactions to elements like moving, resizing or sorting. PRADO Jui interactions controls applies these interactions to a TActivePanel For informations of the specific options of each interaction, follow jQuery-UI Interaction API Documentation for the specific interaction.

        -

        TJuiDraggable

        +

        TJuiDraggable

        - jQuery UI API

        @@ -22,7 +22,7 @@ The panel can be moved using the mouse, and eventually dropped over a -

        TJuiDroppable

        +

        TJuiDroppable

        - jQuery UI API

        @@ -37,7 +37,7 @@ When a TJuiDraggable
        -

        TJuiResizable

        +

        TJuiResizable

        - jQuery UI API

        TJuiResizable is an extension to TActivePanel based on jQuery-UI's Resizable interaction. @@ -52,7 +52,7 @@ A small handle is shown on the bottom right corner of the panel, that permits th -

        TJuiSelectable

        +

        TJuiSelectable

        - jQuery UI API

        TJuiSelectable is an extension to TActivePanel based on jQuery-UI's Selectable interaction. @@ -67,7 +67,7 @@ A small handle is shown on the bottom right corner of the panel, that permits th -

        TJuiSortable

        +

        TJuiSortable

        - jQuery UI API

        TJuiSortable is an extension to TActivePanel based on jQuery-UI's Sortable interaction. diff --git a/demos/quickstart/protected/pages/JuiControls/Widgets.page b/demos/quickstart/protected/pages/JuiControls/Widgets.page index 63c6aa32..5bf8b083 100644 --- a/demos/quickstart/protected/pages/JuiControls/Widgets.page +++ b/demos/quickstart/protected/pages/JuiControls/Widgets.page @@ -1,5 +1,5 @@ -

        Jui widgets controls

        +

        Jui widgets controls

        Jui widgets are complex controls built on the foundations of jQuery effects and jQueryUI interactions. PRADO Jui widgets controls can be divided in two groups: @@ -11,7 +11,7 @@ For informations of the specific options of each widget, follow jQuery-UI Widget

        -

        TJuiProgressbar

        +

        TJuiProgressbar

        -
        jQuery UI API

        @@ -26,7 +26,7 @@ The panel takes the aspect of a progressbar ranging from a value of 0 to the val
        -

        TJuiAutoComplete

        +

        TJuiAutoComplete

        -
        jQuery UI API

        @@ -50,7 +50,7 @@ When a suggestion is selected the OnSuggestionSelected event is raised, -

        TJuiDialog

        +

        TJuiDialog

        -
        jQuery UI API

        @@ -72,7 +72,7 @@ The buttons may contain a callback that will be fired when they are clicked. -

        TJuiDatePicker

        +

        TJuiDatePicker

        -
        jQuery UI API

        diff --git a/demos/site/.htaccess b/demos/site/.htaccess new file mode 100644 index 00000000..cd03b45e --- /dev/null +++ b/demos/site/.htaccess @@ -0,0 +1,8 @@ + +RewriteEngine on + +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ index.php/$1 [L] + + \ No newline at end of file diff --git a/demos/site/assets/.gitignore b/demos/site/assets/.gitignore new file mode 100755 index 00000000..d6b7ef32 --- /dev/null +++ b/demos/site/assets/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/demos/site/index.php b/demos/site/index.php new file mode 100755 index 00000000..0192f1cb --- /dev/null +++ b/demos/site/index.php @@ -0,0 +1,17 @@ +run(); + diff --git a/demos/site/protected/.htaccess b/demos/site/protected/.htaccess new file mode 100755 index 00000000..8d2f2563 --- /dev/null +++ b/demos/site/protected/.htaccess @@ -0,0 +1 @@ +deny from all diff --git a/demos/site/protected/Common/SimpleMenu.php b/demos/site/protected/Common/SimpleMenu.php new file mode 100644 index 00000000..bcbc94cf --- /dev/null +++ b/demos/site/protected/Common/SimpleMenu.php @@ -0,0 +1,86 @@ +renderBeginTag("ul"); + parent::renderChildren($writer); + $writer->renderEndTag(); + } + +} + +class SimpleMenuItem extends TControl +{ + + public function getPath() + { + return $this->getControlState("Path", null); + } + + public function setPath($value) + { + $this->setControlState("Path", TPropertyValue::ensureString($value)); + } + + public function getUrl() + { + return $this->getControlState("Url", null); + } + + public function setUrl($value) + { + $this->setControlState("Url", TPropertyValue::ensureString($value)); + } + + public function getTarget() + { + return $this->getControlState("Target", null); + } + + public function setTarget($value) + { + $this->setControlState("Target", TPropertyValue::ensureString($value)); + } + + public function getText() + { + return $this->getControlState("Text", $this->getID()); + } + + public function setText($value) { + $this->setControlState("Text", TPropertyValue::ensureString($value)); + } + + public function render($writer) + { + $writer->renderBeginTag("li"); + + if(null !== $path = $this->getPath()) + { + $writer->addAttribute('href', $this->Service->constructUrl($path)); + + if($path == $this->Page->getPagePath()) + $writer->addAttribute('class', 'active'); + } elseif(null !== $url = $this->getUrl()) { + $writer->addAttribute('href', $url); + } + + if($this->getTarget() !== null) + $writer->addAttribute('target', $this->getTarget()); + + $writer->renderBeginTag("a"); + + $writer->write(THttpUtility::htmlEncode($this->getText())); + + $writer->renderEndTag(); + $writer->renderEndTag(); + } +} diff --git a/demos/site/protected/Layouts/MainLayout.php b/demos/site/protected/Layouts/MainLayout.php new file mode 100644 index 00000000..15302dfc --- /dev/null +++ b/demos/site/protected/Layouts/MainLayout.php @@ -0,0 +1,5 @@ + + + + + + + + + + + + + +

        + + +
        + +
        + + + \ No newline at end of file diff --git a/demos/site/protected/Pages/About.page b/demos/site/protected/Pages/About.page new file mode 100644 index 00000000..62d3af2d --- /dev/null +++ b/demos/site/protected/Pages/About.page @@ -0,0 +1,55 @@ + + +
        +

        The PRADO Group

        +

        +The PRADO group is a team of PRADO enthusiasts who develop and promote the PRADO framework and the related projects. +

        +

        Team Members

        +
          +
        • Fabio Bas - development, testing
        • +
        • Ciro Mattia Gonano - github/packagist maintainer
        • +
        • Daniel Sampedro Bello - wsat development
        • +
        • David Otto - development, testing
        • +
        • Jens Klaer - development, testing
        • +
        +

        The following Team Members are currently inactive.

        +
          +
        • Qiang Xue - founder of PRADO framework, core development
        • +
        • Xiang Wei Zhuo - core development (javascripts, active controls, DB controls, tests)
        • +
        • Jason Ragsdale - site and forum administration
        • +
        • Knut Urdalen - test, marketing
        • +
        • Eirik Hoem - core development
        • +
        • Yves Berkholz - core development
        • +
        • Michael Hartl - component development, testing
        • +
        • Carl G. Mathisen - design and document comment system
        • +
        • Christophe Boulain - component development, testing
        • +
        • Robin J. Rogge - site and forum adminitration, core development
        • +
        +

        Past Team Members

        +

        +Alex Flint, Brian Luft, John Teague, Todd Patrick, Pim van der Zwet, Tim Evans, Alban Hanry, Marcus Nyeholt +

        + +

        History of PRADO

        +

        +The very original inspiration of PRADO came from Apache Tapestry. During the design and implementation, Qiang Xue borrowed many ideas from Borland Delphi and Microsoft ASP.NET. The first version of PRADO came out in June 2004 and was written in PHP 4. Driven by the Zend PHP 5 coding contest, Qiang rewrote PRADO in PHP 5, which proved to be a wise move, thanks to the new object model provided by PHP 5. PRADO won the grand prize in the Zend contest, earning high votes both from the public and from the judges' panel. +

        +

        +In August 2004, PRADO was hosted on SourceForge as an open source project. Soon after, the project site xisc.com was announced to public. With the fantastic support of PRADO developer team and PRADO users, PRADO evolved to version 2.0 in mid 2005. In this version, Wei Zhuo contributed to PRADO with the excellent I18 and L10N support. +

        +

        +In May 2005, developers decided to completely rewrite the PRADO framework to resolve a few fundamental issues found in version 2.0 and to catch up with some cool features available in Microsoft ASP.NET 2.0. After nearly a year's hard work with over 50,000 lines of new code, version 3.0 was finally made available in April 2006. +

        +

        +In October 2008, the original development team released a new framework called Yii. Inheriting most of the PRADO code, Yii left the pages/events concept, focusing on a pure MVC design pattern. Since 2009 a lot of people contributed to PRADO fixing issues, developing new features or backporting them from Yii. +

        +

        +To promote a model of community-driven development, the project repositories were moved first on Google Code and then, in September 2013, on GitHub. +

        +

        +Starting from version 3.0, significant efforts are allocated to ensure the quality and stability of PRADO. If we say PRADO v2.x and v1.x are proof-of-concept work, we can say PRADO 3.x has grown up to a project that is suitable for serious business application development. +

        + +
        +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/Demos.page b/demos/site/protected/Pages/Demos.page new file mode 100644 index 00000000..dbc7635d --- /dev/null +++ b/demos/site/protected/Pages/Demos.page @@ -0,0 +1,31 @@ + + +
        + +

        Online Demos

        +

        +The following demos are developed using the PRADO framework. They are also available under the demos directory in the PRADO release. +

        +
        +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/Documentation.page b/demos/site/protected/Pages/Documentation.page new file mode 100644 index 00000000..0a4dd73f --- /dev/null +++ b/demos/site/protected/Pages/Documentation.page @@ -0,0 +1,42 @@ + + +
        + + + + +

        API Manual

        + +The API Manual contains the documentation for all the classes declared in PRADO. + +
        +
        +

        Tutorials

        + +
          +
        • The QuickStart Tutorial - This tutorial is a definitive guidance showing every aspect of PRADO. It is written in PRADO and contains many demos to show the usage of various PRADO controls. The tutorial is also available as a PDF file.
        • +
        • The PRADO Blog Tutorial - This tutorial shows how to use PRADO to build a complete Web application. Prior PRADO knowledge is not required.
        • +
        • The SQLMap Tutorial - This tutorial is a definitive guidance on how to use SQLMap (available since v3.1.0).
        • +
        + + +
        + +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/Download.page b/demos/site/protected/Pages/Download.page new file mode 100644 index 00000000..bdc21221 --- /dev/null +++ b/demos/site/protected/Pages/Download.page @@ -0,0 +1,116 @@ + + +
        + +

        Download

        +

        PRADO is an open source project hosted on GitHub. It is released under the terms of +.

        +

        The latest stable version of PRADO is <%= Prado::getVersion() %>.

        + + + + + +$(document).ready(function () { + $.getJSON("https://api.github.com/repos/pradosoft/prado/releases").done(function (json) { + var release = json[0]; + + var releaseVer = release.tag_name; + var releaseDate = new Date(release.published_at); + var downloadURL = release.assets[0].browser_download_url; + + var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + var day = releaseDate.getDate(); + var monthIndex = releaseDate.getMonth(); + var year = releaseDate.getFullYear(); + + $("#lastVersion").text(releaseVer); + $("#lastVersionDate").text(' (' + day + ' ' + monthNames[monthIndex] + ' ' + year + ')'); + $("#downloadLink").attr("href", downloadURL); + }); + + $.get("https://raw.githubusercontent.com/pradosoft/prado/master/HISTORY", function(data) { + $("#changeLog").text(data); + }); +}); + + +
        +

        Latest changelog entries

        +
        loading...
        + +
        +

        Previous PRADO v3.x releases

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        VersionDate Files
        3.2.4Aug 26, 2014Source code and documentation
        3.2.3Nov 26, 2013Source code and documentation
        3.2.2July 20, 2013Source code, documentation
        3.2.1January 19, 2013Source code, documentation
        3.2.0June 25, 2012Source code, documentation
        3.1.10July 27, 2011Source code, documentation
        3.1.9June 3, 2011Source code, documentation
        3.1.8May 29, 2011Source code, documentation
        3.1.7February 22, 2010Source code, documentation
        3.1.6July 22, 2009Source code, documentation
        3.1.5May 24, 2009Source code, documentation
        3.1.4January 11, 2009Source code, documentation
        3.1.3November 1, 2008Source code, documentation
        3.1.2April 21, 2008Source code
        3.1.1October 1, 2007Source code
        3.1.0July 2, 2007Source code
        3.0.7April 2, 2007Source code
        3.0.6December 4, 2006Source code
        3.0.5October 23, 2006Source code
        3.0.4September 4, 2006Source code
        3.0.3August 6, 2006Source code
        3.0.2July 2, 2006Source code
        3.0.1June 4, 2006Source code
        3.0.0May 1, 2006Source code
        +
        +
        +

        PRADO Tools

        + + + + + + + + + + + + + + + + + + + + + + + + + + +
        FileDescriptionRelease date
        Dreamweaver ExtensionPRADO Dreamweaver Extension (r2764)February 14, 2010
        InType BundlePRADO InType Bundle (r2854)June 23, 2010
        Notepad++ PluginPRADO Notepad++ Plugin (r2793)April 6, 2010
        Textmate BundlePRADO TextMate Bundle, suitable also for Sublime Text 2 (r3193)July 24, 2012
        +
        +
        +

        Git Access

        +

        You can obtain the latest development version of PRADO from our Git repository.

        +
        WARNING: Unreleased Source code in Git may contain known bugs and are subject to changes without prior notice.
        +

        The Source code repository can be accessed anonymously using the following command,

        +
        git clone https://github.com/pradosoft/prado.git
        + +
        + +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/Home.page b/demos/site/protected/Pages/Home.page new file mode 100755 index 00000000..b9cc49b7 --- /dev/null +++ b/demos/site/protected/Pages/Home.page @@ -0,0 +1,37 @@ + + + + +
        +
        +

        What is PRADO?

        +

        PRADOTM is a component-based and event-driven programming framework for developing Web applications in PHP 5. PRADO stands for PHP Rapid Application Development Object-oriented.

        +
        +
        +

        What does PRADO require?

        +

        The sole requirement to run PRADO-based applications is a Web server supporting PHP 5.3.0 or higher. PRADO is free. You can use it to develop either open source or commercial applications.

        +
        +
        +

        Quick facts about PRADO

        +

        + First release: August 2004
        + License: revised BSD
        + Lines of core code: > 150,000 lines
        + Number of classes: > 700
        + Downloads: > 430,000 15/09/2013
        +

        +
        +
        + +
        +
        + +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/License.page b/demos/site/protected/Pages/License.page new file mode 100644 index 00000000..9636acf9 --- /dev/null +++ b/demos/site/protected/Pages/License.page @@ -0,0 +1,28 @@ + + +
        + +

        License of PRADO

        + +

        +The PRADO framework and the included demos are free software. They are released under the terms of the following BSD License. +

        +

        +Copyright 2004-<%= date('Y') %> by The PRADO Group (http://www.pradosoft.com)
        +All rights reserved. +

        +

        +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +

        +
          +
        • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        • +
        • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        • +
        • Neither the name of the PRADO Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        • +
        +

        +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

        + +
        + +
        \ No newline at end of file diff --git a/demos/site/protected/Pages/Tos.page b/demos/site/protected/Pages/Tos.page new file mode 100644 index 00000000..18f4750c --- /dev/null +++ b/demos/site/protected/Pages/Tos.page @@ -0,0 +1,42 @@ + + +
        + +

        Terms of Service

        + +

        +This web site is owned and operated by Prado Software Group, (PradoSoft or we). We have created this page to share with you our privacy and legal policies regarding to your personal information and the contents on this site. +

        + +

        Privacy Policy

        +

        +We do not collect personal information about you unless you voluntarily provide it to us or authorize us to collect it. We consider the following to be personal information: your name, email address, phone number, date of birth, job, personal interests, your e-mail address. We treat personal information confidentially. +

        +

        +We do collect and track certain non-personally information, including but not limited to, user IP numbers and browser type, access times, domain names, usage habits and other information which does not specifically identify any individual. +

        +

        +We may use cookies to customize your use of the web site and for other purposes to improve your use of the service, and may also use web beacons, web bugs, action tags and third party cookies. You may stop or restrict the placement of cookies on your computer or flush them from your browser by adjusting your web browser preferences, in which case you may still use our Service, but it may interfere with some of its functionality. We do not use cookies to automatically retrieve personal information from your computer without your knowledge. +

        + +

        Legal Disclaimer

        +

        +All the information and contents posted on this web site are the property of PradoSoft, and are protected by U.S. and foreign copyright laws. By accessing this web site, you agree to the following terms and conditions. You shall not use this web site if you do not agree. +

        +
          +
        1. This web site and its contents may NOT be copied or distributed in any manner without the prior written consent of PradoSoft.
        2. +
        3. PradoSoft MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THIS WEB SITE, ITS CONTENTS OR THE MANUSCRIPT, WHICH ARE PROVIDED FOR USE "AS IS" AND IS WITHOUT WARRANTY OF ANY KIND.
        4. +
        5. Portions of this web site may publish readers comments and opinion. PradoSoft does not assume or have any responsibility or any liability for the readers comments or opinions.
        6. +
        + +

        Change of Policies

        +

        +The above policies may change from time to time. PradoSoft will post those changes on this page. +

        +

        +This page was last updated on May 2, 2006. +

        + +
        + +
        \ No newline at end of file diff --git a/demos/site/protected/application.xml b/demos/site/protected/application.xml new file mode 100644 index 00000000..b937e82b --- /dev/null +++ b/demos/site/protected/application.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demos/site/protected/runtime/.gitignore b/demos/site/protected/runtime/.gitignore new file mode 100755 index 00000000..d6b7ef32 --- /dev/null +++ b/demos/site/protected/runtime/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/demos/site/themes/Prado/favicon.ico b/demos/site/themes/Prado/favicon.ico new file mode 100644 index 00000000..28d63172 Binary files /dev/null and b/demos/site/themes/Prado/favicon.ico differ diff --git a/demos/site/themes/Prado/imgs/bg.gif b/demos/site/themes/Prado/imgs/bg.gif new file mode 100644 index 00000000..d4ce965e Binary files /dev/null and b/demos/site/themes/Prado/imgs/bg.gif differ diff --git a/demos/site/themes/Prado/imgs/bigmantis.jpg b/demos/site/themes/Prado/imgs/bigmantis.jpg new file mode 100644 index 00000000..7520aab4 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bigmantis.jpg differ diff --git a/demos/site/themes/Prado/imgs/bigmantis.jpg.1 b/demos/site/themes/Prado/imgs/bigmantis.jpg.1 new file mode 100644 index 00000000..7520aab4 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bigmantis.jpg.1 differ diff --git a/demos/site/themes/Prado/imgs/bottomgradient.gif b/demos/site/themes/Prado/imgs/bottomgradient.gif new file mode 100644 index 00000000..4309dc30 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bottomgradient.gif differ diff --git a/demos/site/themes/Prado/imgs/bullet_one.gif b/demos/site/themes/Prado/imgs/bullet_one.gif new file mode 100644 index 00000000..8d42c689 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bullet_one.gif differ diff --git a/demos/site/themes/Prado/imgs/bullet_three.gif b/demos/site/themes/Prado/imgs/bullet_three.gif new file mode 100644 index 00000000..099522c2 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bullet_three.gif differ diff --git a/demos/site/themes/Prado/imgs/bullet_two.gif b/demos/site/themes/Prado/imgs/bullet_two.gif new file mode 100644 index 00000000..cd8001a8 Binary files /dev/null and b/demos/site/themes/Prado/imgs/bullet_two.gif differ diff --git a/demos/site/themes/Prado/imgs/mainmenu_active.gif b/demos/site/themes/Prado/imgs/mainmenu_active.gif new file mode 100644 index 00000000..47974274 Binary files /dev/null and b/demos/site/themes/Prado/imgs/mainmenu_active.gif differ diff --git a/demos/site/themes/Prado/imgs/mainmenu_hover.gif b/demos/site/themes/Prado/imgs/mainmenu_hover.gif new file mode 100644 index 00000000..26355b3c Binary files /dev/null and b/demos/site/themes/Prado/imgs/mainmenu_hover.gif differ diff --git a/demos/site/themes/Prado/imgs/pradodownload.gif b/demos/site/themes/Prado/imgs/pradodownload.gif new file mode 100644 index 00000000..4b063dbb Binary files /dev/null and b/demos/site/themes/Prado/imgs/pradodownload.gif differ diff --git a/demos/site/themes/Prado/imgs/pradoheader.gif b/demos/site/themes/Prado/imgs/pradoheader.gif new file mode 100755 index 00000000..40ca5d29 Binary files /dev/null and b/demos/site/themes/Prado/imgs/pradoheader.gif differ diff --git a/demos/site/themes/Prado/imgs/statementsbg.gif b/demos/site/themes/Prado/imgs/statementsbg.gif new file mode 100644 index 00000000..85836a2e Binary files /dev/null and b/demos/site/themes/Prado/imgs/statementsbg.gif differ diff --git a/demos/site/themes/Prado/style.css b/demos/site/themes/Prado/style.css new file mode 100755 index 00000000..798451c0 --- /dev/null +++ b/demos/site/themes/Prado/style.css @@ -0,0 +1,765 @@ + +/** + * PradoSoft profile by Carl G. Mathisen and Stefan A. Petrov + * http://decart.no + */ + +body +{ + background-color: #ECEDE5; + background-image: url('imgs/bg.gif'); + background-repeat: repeat-x; + background-position: top left; + margin: 0px; + padding: 0px; + text-align: center; +} + +body, div, span, p, input +{ + font-family: Verdana, sans-serif, Arial; + font-size: 10pt; + color: #333333; +} + +h1, h2, h3, h4 +{ + font-family: Verdana, Helvetica, Arial, Lucida Grande, Trebuchet MS; + padding: 0px; + margin: 0px; + margin-bottom: 10px; + color: #821B18; + font-weight: normal; +} + +h2 +{ + font-size: 18px; +} + +h3 +{ + font-size: 16px; +} + +div +{ + text-align: left; +} + +.instructions +{ + background-color: #EEEEEE; + padding: 5px; +} + +img +{ + border: none; +} + +a +{ + color: #CD2C27; + text-decoration: none; +} + +a:hover +{ + color: #821B18; + text-decoration: underline; +} + +#page +{ + margin: 0 auto; + padding: 0; + width: 841px; + position: relative; +} + +#header +{ + position: relative; + height: 98px; +} + +#logo +{ + height: 99px; +} + +#mainmenu +{ + position: absolute; + top: 69px; +} + +#mainmenu ul +{ + margin-left: 0; + padding-left: 0; + display: inline; +} + +#mainmenu ul li +{ + margin-left: 0px; + list-style: none; + display: inline; +} + +#mainmenu ul li a +{ + display: block; + float: left; + font-size: 14px; + font-weight: bold; + padding-left: 7px; + padding-right: 7px; + padding-top: 5px; + color: #FFFFCC; + text-decoration: none; + height: 29px; +} + +#mainmenu ul li a:hover +{ + background-image: url('imgs/mainmenu_hover.gif'); + background-repeat: repeat-x; + background-position: top left; + color: #fff; +} + +#mainmenu ul li a.active +{ + background-image: url('imgs/mainmenu_active.gif'); + background-repeat: repeat-x; + background-position: top left; + color: #91A412; +} + +/* main page */ + +div.intro +{ + height: 190px; + background-image: url('imgs/bigmantis.jpg'); + background-repeat: no-repeat; + background-position: top right; + background-color: #fff; +} + +div.statements +{ + height: 165px; + background-image: url('imgs/statementsbg.gif'); + background-repeat: repeat-x; + position: relative; + border-bottom : 1px solid #EEE; +} + +div.statements div +{ + position: absolute; + width: 250px; + top: 20px; +} + +div.statements div p +{ + font-size: 13px; + color: #818181; +} + +div.statements div.whatis +{ + left: 20px; +} + +div.statements div.whatreq +{ + left: 310px; +} + +div.statements div.cani +{ + left: 590px; + width: 250px; +} + +/* navbar */ +#navbar +{ + border-bottom: 2px solid #E9EEEF; + height: 30px; + margin-bottom: 20px; +} + +#navbar ul +{ + margin-left: 0; + padding-left: 0; + display: inline; +} + +#navbar ul li +{ + margin-left: 0px; + list-style: none; + display: inline; +} + +#navbar ul li a +{ + display: block; + float: left; + font-size: 14px; + font-weight: bold; + padding-right: 14px; + padding-top: 5px; + color: #CD2B26; + height: 29px; +} + +#navbar ul li a.active, #navbar ul li a.hover +{ + color: #821B18; +} + +#navbar ul li a.hover +{ + text-decoration: underline; +} + +/* infobar */ +div#infobar +{ + float: right; + width: 200px; + padding-left: 20px; + border-left: 2px solid #E9EEEF; +} + +div#infobar div +{ + margin-bottom: 20px; +} + +div#infobar div#featured img +{ + margin-top: 10px; +} + +/* articles */ + +div#articles +{ + width: 560px; + float: left; +} + +/* article */ + +div.article +{ + margin-bottom: 40px; +} + +div.article .date +{ + color: #9F9291; +} + +div.article .more +{ + margin-right: 10px; + display: block; + text-align: right; +} + +.logo +{ + position: absolute; + margin-left: 15px; + margin-top: 0px; + z-index: 1; +} + +#main +{ + padding: 20px; + padding-top: 20px; + background-color: #fff; +} + +div.mantis +{ + height: 190px; + background-color: #fff; + background-image: url('imgs/bigmantis.jpg'); + background-repeat: no-repeat; + background-position: top right; + border-bottom: 1px solid #DCDCDC; +} + +div.releases +{ + float: left; + width: 240px; + height: 190px; + background-image: url('imgs/pradodownload.gif'); + background-repeat: no-repeat; +} + +div.releases div.official +{ + width: 190px; + position: relative; + left: 52px; + top: 128px; + font-size: 8pt; + color: #6D6D6D; +} + +div.releases div.official a +{ + display: block; +} + +div.whyprado +{ + display: block; + float: left; +} + +div.whyprado ul.list +{ + margin-top: 40px; + margin-left: 40px; +} + +div.whyprado ul.list li +{ + display: block; + margin: 5px; + padding: 0px; + font-size: 18px; + background-repeat: no-repeat; + background-position: bottom left; + padding-left: 30px; + list-style: none; +} + +div.whyprado ul.list li.one +{ + background-image: url('imgs/bullet_one.gif'); +} + +div.whyprado ul.list li.two +{ + background-image: url('imgs/bullet_two.gif'); +} + +div.whyprado ul.list li.three +{ + background-image: url('imgs/bullet_three.gif'); +} + +div.whyprado ul.list li a +{ + color: #9F9291; + text-decoration: none; +} + +#footer +{ + border-top: 1px solid #e9eeef; + background-color: #fff; + clear: both; + color: #A7A7A7; + font-size: 8pt; + text-align: center; + padding-top: 10px; + padding-bottom: 30px; + background-image: url('imgs/bottomgradient.gif'); + background-repeat: repeat-x; + background-position: bottom; +} + +#ads +{ + font-size: 8pt; + text-align: center; +} +#features +{ + margin-left: 610px; + padding: 10px; + padding-left: 10px; + padding-right: 10px; + background-color: #BEDD75; + color: #344A1E; + font-size: 9pt; +} + +#features ul +{ + margin: 10px; + padding: 0px; +} + +#features ul li +{ + font-size: 8pt; + padding: 0px; + margin: 0px; + margin-top: 8px; +} + +#features h3 +{ + margin: 0px; + padding: 0px; + font-size: 10pt; + color: #292E1D; + text-align: center; + border-bottom: 1px solid silver; +} + +#news +{ + float: left; + width: 590px; +} + +.newstitle +{ + font-size: 12pt; + font-weight: bold; + color: #555; + margin-top: 10px; + margin-bottom: 0px; + border-bottom: 1px solid silver; +} + +.newscontentmore +{ + margin-right: 10px; + display: block; + color: #50811A; + text-align: right; +} + +.newscontentmore:hover +{ + color: red; +} + +.newstime +{ + margin: 0px; + font-size:0.8em; + color:#aaa; + padding-left:10px; + text-align: right; +} + +.newscontent +{ + margin-top: 5px; +} + +#leftpanel +{ + float: left; + width: 550px; +} + +#topics +{ + border: 1px solid #804040; + margin-left: 610px; + padding-bottom: 10px; +} + +#topicsheader +{ + text-align:center; + font-weight:bold; + background-color:#804040; + color:#FFFFBC; + padding: 3px; + margin-bottom:0px; +} + +.topicitem +{ + padding: 5px; +} + +.topicitem a:hover +{ + text-decoration: underline; +} + +.topicitem p +{ + margin: 0px; + font-size:0.8em; + color:#aaa; + padding-left:10px; + white-space:nowrap; +} + +.reference +{ +} + +.reference img +{ + margin: 10px; +} + +.reference h3 +{ +} + + +.download +{ + width: 100%; + background-color: #aaa; +} + +.download td +{ + background-color: #FFFFFF; + padding: 2px 5px; + font-size: 9pt; +} + +.download td a +{ + font-weight: bold; +} + +.download td.type +{ + font-family: "courier new", courier; + text-align: right; + vertical-align: top; +} + +.download div.declaration +{ + font-family: "courier new", courier; +} + + +.download th +{ + background-color: #F0F0F0; + font-weight: bold; + font-size: 9pt; + padding: 5px; + text-align: left; +} + +.download th.small +{ + font-size: 1.0em; +} + +.download tr.reference td { + background-color: #FFEDED; +} + + +.doc-title +{ + font-size: 14pt; + font-weight: bold; + margin-top: 10px; + margin-bottom: 10px; +} + +.doc-subtitle +{ + font-size: 11pt; + font-weight: bold; + background-color: #EEE; + padding: 5px; + margin-top: 20px; +} + +.doc-namespace +{ + font-size: 8pt; +} + + +.doc-menu +{ +} + +.doc-classes +{ +} + +.doc-ancestors +{ + font-size: 8pt; +} + +.doc-properties +{ + font-size: 9pt; +} + +.doc-properties table +{ + border-collapse: collapse; + background-color: silver; + width: 100%; +} + +.doc-properties td, .doc-properties th +{ + padding: 3px; + vertical-align: top; + background-color: white; + border: 1px solid silver; +} + +.doc-events +{ + font-size: 9pt; +} + +.doc-events table +{ + border-collapse: collapse; + background-color: silver; + width: 100%; +} + +.doc-events td, .doc-events th +{ + padding: 3px; + vertical-align: top; + background-color: white; + border: 1px solid silver; +} + +.doc-methods +{ + font-size: 9pt; +} + +.doc-methods table +{ + border-collapse: collapse; + background-color: silver; + width: 100%; +} + +.doc-methods td, .doc-methods th +{ + padding: 3px; + vertical-align: top; + background-color: white; + border: 1px solid silver; +} + +.doc-derived +{ +} + +.doc-inherited +{ +} + +.doc-native td +{ + background-color: lightyellow; +} + +.forum-topic +{ + padding: 10px; + border:1px solid silver; + margin-bottom: 10px; +} + + +.demo-list li +{ + margin-bottom: 1em; +} + +.autocomplete +{ + border:1px solid #ccc; + background-color:white; +} +.autocomplete ul, .autocomplete li +{ + margin: 0; + padding: 0; + list-style: none; + font-size: 11px; + font-family: Tahoma, Arial, Helvetica, sans-serif; + color: #333; +} + +ul.different +{ + background-color: pink; +} + +.autocomplete li +{ + padding: 5px; + background-color: #ffe; +} +.autocomplete .selected +{ + background-color: #eec; +} + +#ads ul +{ + list-style-type: none; + margin: 5px; + margin-left: 0px; + padding: 0; + font-size: 10px; +} + +#ads li +{ + margin-bottom: 7px; +} + +#ads a +{ + color: black; + border-bottom: 1px dashed silver; +} + +#changelog +{ + overflow:scroll; + height: 250px; + border:1px solid #ccc; + white-space: pre-wrap; /* CSS 3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + padding: 10px; + -webkit-box-shadow: inset 0px -10px 10px -5px rgba(0,0,0,0.75); + -moz-box-shadow: inset 0px -10px 10px -5px rgba(0,0,0,0.75); + box-shadow: inset 0px -10px 10px -5px rgba(0,0,0,0.75); +} -- cgit v1.2.3