7168 changed files with 12383 additions and 315978 deletions
@ -0,0 +1,3 @@
|
||||
/demos export-ignore |
||||
/tests export-ignore |
||||
/documentation export-ignore |
@ -1,55 +1,63 @@
|
||||
Development using a virtual machine |
||||
################################### |
||||
# Development using a virtual machine |
||||
|
||||
You can set up a development virtual machine for ZF1 unit testing and library |
||||
development following these simple instructions. |
||||
|
||||
1. Install requirements for VM. (Note: these are not required by ZF1 itself) |
||||
- VirtualBox (https://www.virtualbox.org/) |
||||
- Ruby (http://www.ruby-lang.org/) |
||||
- Vagrant (http://vagrantup.com/) |
||||
### 1. Install requirements for VM. (Note: these are not required by ZF1 itself) |
||||
|
||||
2. Checkout repository to any location |
||||
> git clone git://github.com:zendframework/zf1.git zf1-dev |
||||
> cd zf1-dev |
||||
|
||||
3. Start the process by running Vagrant. |
||||
> vagrant up |
||||
- VirtualBox (https://www.virtualbox.org/) |
||||
- Ruby (http://www.ruby-lang.org/) |
||||
- Vagrant (http://vagrantup.com/) |
||||
|
||||
### 2. Checkout repository to any location |
||||
|
||||
git clone git://github.com/zendframework/zf1.git zf1-dev |
||||
cd zf1-dev |
||||
|
||||
### 3. Start the process by running Vagrant. |
||||
|
||||
vagrant up |
||||
|
||||
This will take a long while as it has to download a VM image and then |
||||
provision it. Once it has finished, it will exit and leave you back at the |
||||
command prompt. |
||||
|
||||
This will take a long while as it has to download a VM image and then |
||||
provision it. Once it has finished, it will exit and leave you back at the |
||||
command prompt. |
||||
### 4. SSH into the VM |
||||
|
||||
4. SSH into the VM |
||||
> vagrant ssh |
||||
vagrant ssh |
||||
|
||||
5. Build a version of PHP. |
||||
> php-build.sh 5.3.11 |
||||
### 5. Build a version of PHP. |
||||
|
||||
This also takes a while as it compiles PHP for you! |
||||
php-build.sh 5.3.11 |
||||
|
||||
This also takes a while as it compiles PHP for you! |
||||
|
||||
6. Select PHP to use: |
||||
> pe 5.3.11 |
||||
### 6. Select PHP to use: |
||||
|
||||
pe 5.3.11 |
||||
|
||||
### 7. Run tests |
||||
|
||||
7. Run tests |
||||
> cd /vagrant/tests |
||||
> phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php |
||||
> phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php |
||||
(etc...) |
||||
cd /vagrant/tests |
||||
phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php |
||||
phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php |
||||
(etc...) |
||||
|
||||
Note that you can repeat items 5 and 6 to create any version if PHP. |
||||
|
||||
|
||||
Notes: |
||||
## Notes: |
||||
|
||||
- The VM will be running in the background as VBoxHeadless |
||||
- HTTP and SSH ports on the VM are forwarded to localhost (22 -> 2222, 80 -> 8081) |
||||
- The zf1-dev directory you checked out will be mounted inside the VM at /vagrant |
||||
- You can develop by editing the files you cloned in the IDE of you choice. |
||||
- To stop the VM do one of the following: |
||||
> vagrant suspend # if you plan on running it later |
||||
> vagrant halt # if you wish to turn off the VM, but keep it around |
||||
> vagrant destroy # if you wish to delete the VM completely |
||||
- Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them: |
||||
> vagrant provision |
||||
|
||||
To stop the VM do one of the following: |
||||
|
||||
vagrant suspend # if you plan on running it later |
||||
vagrant halt # if you wish to turn off the VM, but keep it around |
||||
vagrant destroy # if you wish to delete the VM completely |
||||
|
||||
Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them: |
||||
|
||||
vagrant provision |
@ -1,505 +0,0 @@
|
||||
dojo.provide("dijit.Calendar"); |
||||
|
||||
dojo.require("dojo.cldr.supplemental"); |
||||
dojo.require("dojo.date"); |
||||
dojo.require("dojo.date.locale"); |
||||
|
||||
dojo.require("dijit._Widget"); |
||||
dojo.require("dijit._Templated"); |
||||
dojo.require("dijit._CssStateMixin"); |
||||
|
||||
dojo.declare( |
||||
"dijit.Calendar", |
||||
[dijit._Widget, dijit._Templated, dijit._CssStateMixin], |
||||
{ |
||||
// summary:
|
||||
// A simple GUI for choosing a date in the context of a monthly calendar.
|
||||
//
|
||||
// description:
|
||||
// A simple GUI for choosing a date in the context of a monthly calendar.
|
||||
// This widget can't be used in a form because it doesn't serialize the date to an
|
||||
// `<input>` field. For a form element, use dijit.form.DateTextBox instead.
|
||||
//
|
||||
// Note that the parser takes all dates attributes passed in the
|
||||
// [RFC 3339 format](http://www.faqs.org/rfcs/rfc3339.html), e.g. `2005-06-30T08:05:00-07:00`
|
||||
// so that they are serializable and locale-independent.
|
||||
//
|
||||
// example:
|
||||
// | var calendar = new dijit.Calendar({}, dojo.byId("calendarNode"));
|
||||
//
|
||||
// example:
|
||||
// | <div dojoType="dijit.Calendar"></div>
|
||||
|
||||
templateString: dojo.cache("dijit", "templates/Calendar.html"), |
||||
|
||||
// value: Date
|
||||
// The currently selected Date
|
||||
value: new Date(), |
||||
|
||||
// datePackage: String
|
||||
// JavaScript namespace to find Calendar routines. Uses Gregorian Calendar routines
|
||||
// at dojo.date by default.
|
||||
datePackage: "dojo.date", |
||||
|
||||
// dayWidth: String
|
||||
// How to represent the days of the week in the calendar header. See dojo.date.locale
|
||||
dayWidth: "narrow", |
||||
|
||||
// tabIndex: Integer
|
||||
// Order fields are traversed when user hits the tab key
|
||||
tabIndex: "0", |
||||
|
||||
baseClass:"dijitCalendar", |
||||
|
||||
// Set node classes for various mouse events, see dijit._CssStateMixin for more details
|
||||
cssStateNodes: { |
||||
"decrementMonth": "dijitCalendarArrow", |
||||
"incrementMonth": "dijitCalendarArrow", |
||||
"previousYearLabelNode": "dijitCalendarPreviousYear", |
||||
"nextYearLabelNode": "dijitCalendarNextYear"
|
||||
}, |
||||
|
||||
attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, { |
||||
tabIndex: "domNode" |
||||
}), |
||||
|
||||
setValue: function(/*Date*/ value){ |
||||
// summary:
|
||||
// Deprecated. Used attr('value', ...) instead.
|
||||
// tags:
|
||||
// deprecated
|
||||
dojo.deprecated("dijit.Calendar:setValue() is deprecated. Use set('value', ...) instead.", "", "2.0"); |
||||
this.set('value', value); |
||||
}, |
||||
|
||||
_getValueAttr: function(){ |
||||
// summary:
|
||||
// Support getter attr('value')
|
||||
var value = new this.dateClassObj(this.value); |
||||
value.setHours(0, 0, 0, 0); // return midnight, local time for back-compat
|
||||
|
||||
// If daylight savings pushes midnight to the previous date, fix the Date
|
||||
// object to point at 1am so it will represent the correct day. See #9366
|
||||
if(value.getDate() < this.value.getDate()){ |
||||
value = this.dateFuncObj.add(value, "hour", 1); |
||||
} |
||||
return value; |
||||
}, |
||||
|
||||
_setValueAttr: function(/*Date*/ value){ |
||||
// summary:
|
||||
// Support setter attr("value", ...)
|
||||
// description:
|
||||
// Set the current date and update the UI. If the date is disabled, the value will
|
||||
// not change, but the display will change to the corresponding month.
|
||||
// tags:
|
||||
// protected
|
||||
if(!this.value || this.dateFuncObj.compare(value, this.value)){ |
||||
value = new this.dateClassObj(value); |
||||
value.setHours(1); // to avoid issues when DST shift occurs at midnight, see #8521, #9366
|
||||
this.displayMonth = new this.dateClassObj(value); |
||||
if(!this.isDisabledDate(value, this.lang)){ |
||||
this.value = value; |
||||
this.onChange(this.get('value')); |
||||
} |
||||
dojo.attr(this.domNode, "aria-label", |
||||
this.dateLocaleModule.format(value, |
||||
{selector:"date", formatLength:"full"})); |
||||
this._populateGrid(); |
||||
} |
||||
}, |
||||
|
||||
_setText: function(node, text){ |
||||
// summary:
|
||||
// This just sets the content of node to the specified text.
|
||||
// Can't do "node.innerHTML=text" because of an IE bug w/tables, see #3434.
|
||||
// tags:
|
||||
// private
|
||||
while(node.firstChild){ |
||||
node.removeChild(node.firstChild); |
||||
} |
||||
node.appendChild(dojo.doc.createTextNode(text)); |
||||
}, |
||||
|
||||
_populateGrid: function(){ |
||||
// summary:
|
||||
// Fills in the calendar grid with each day (1-31)
|
||||
// tags:
|
||||
// private
|
||||
var month = this.displayMonth; |
||||
month.setDate(1); |
||||
var firstDay = month.getDay(), |
||||
daysInMonth = this.dateFuncObj.getDaysInMonth(month), |
||||
daysInPreviousMonth = this.dateFuncObj.getDaysInMonth(this.dateFuncObj.add(month, "month", -1)), |
||||
today = new this.dateClassObj(), |
||||
dayOffset = dojo.cldr.supplemental.getFirstDayOfWeek(this.lang); |
||||
if(dayOffset > firstDay){ dayOffset -= 7; } |
||||
|
||||
// Iterate through dates in the calendar and fill in date numbers and style info
|
||||
dojo.query(".dijitCalendarDateTemplate", this.domNode).forEach(function(template, i){ |
||||
i += dayOffset; |
||||
var date = new this.dateClassObj(month), |
||||
number, clazz = "dijitCalendar", adj = 0; |
||||
|
||||
if(i < firstDay){ |
||||
number = daysInPreviousMonth - firstDay + i + 1; |
||||
adj = -1; |
||||
clazz += "Previous"; |
||||
}else if(i >= (firstDay + daysInMonth)){ |
||||
number = i - firstDay - daysInMonth + 1; |
||||
adj = 1; |
||||
clazz += "Next"; |
||||
}else{ |
||||
number = i - firstDay + 1; |
||||
clazz += "Current"; |
||||
} |
||||
|
||||
if(adj){ |
||||
date = this.dateFuncObj.add(date, "month", adj); |
||||
} |
||||
date.setDate(number); |
||||
|
||||
if(!this.dateFuncObj.compare(date, today, "date")){ |
||||
clazz = "dijitCalendarCurrentDate " + clazz; |
||||
} |
||||
|
||||
if(this._isSelectedDate(date, this.lang)){ |
||||
clazz = "dijitCalendarSelectedDate " + clazz; |
||||
} |
||||
|
||||
if(this.isDisabledDate(date, this.lang)){ |
||||
clazz = "dijitCalendarDisabledDate " + clazz; |
||||
} |
||||
|
||||
var clazz2 = this.getClassForDate(date, this.lang); |
||||
if(clazz2){ |
||||
clazz = clazz2 + " " + clazz; |
||||
} |
||||
|
||||