Permalink
Browse files

Navi refactoring 80%

  • Loading branch information...
1 parent 2d1f3fd commit ae10cbeb5f6671066bd45736ac04ee611588b060 Thiago de Mello Bueno committed May 4, 2011
Showing with 1,299 additions and 3,337 deletions.
  1. +18 −3 application/config/data.xml
  2. +13 −6 modules/mop/MoPCore.js
  3. +8 −7 modules/mop/MoPModules.js
  4. +18 −62 modules/mop/MoPUI.js
  5. +2 −2 modules/mop/thirdparty/digitarald/fancyupload/Swiff.Uploader.js
  6. +2 −2 modules/mop/thirdparty/monkeyphysics/datepicker.js
  7. +0 −2,554 modules/mop/thirdparty/mootools/mootools-more-nc.js
  8. +622 −261 modules/mop/thirdparty/mootools/mootools-more.js
  9. +434 −341 modules/mop/thirdparty/mootools/mootools.js
  10. +1 −1 modules/mopcms/config/mop_cms.php
  11. +41 −24 modules/mopcms/views/css/mop_cms.css
  12. BIN modules/mopcms/views/{css → }/images/admin/bg_row.gif
  13. BIN modules/mopcms/views/{css → }/images/admin/bg_row_alt.gif
  14. BIN modules/mopcms/views/{css → }/images/admin/bg_white60.png
  15. BIN modules/mopcms/views/{css → }/images/admin/bg_white80.png
  16. BIN modules/mopcms/views/{css → }/images/admin/bgk80.png
  17. BIN modules/mopcms/views/{css → }/images/admin/bgk88.png
  18. BIN modules/mopcms/views/{css → }/images/admin/bgk90.png
  19. BIN modules/mopcms/views/{css → }/images/admin/bgk94.png
  20. BIN modules/mopcms/views/{css → }/images/admin/icon_add_category.gif
  21. BIN modules/mopcms/views/{css → }/images/admin/icon_addpage.gif
  22. BIN modules/mopcms/views/{css → }/images/admin/icon_addpage.jpg
  23. BIN modules/mopcms/views/{css → }/images/admin/icon_cancel.gif
  24. BIN modules/mopcms/views/{css → }/images/admin/icon_cancel.png
  25. BIN modules/mopcms/views/{css → }/images/admin/icon_cancel_hover.png
  26. BIN modules/mopcms/views/{css → }/images/admin/icon_confirm.gif
  27. BIN modules/mopcms/views/{css → }/images/admin/icon_confirm.png
  28. BIN modules/mopcms/views/{css → }/images/admin/icon_confirm_hover.png
  29. BIN modules/mopcms/views/{css → }/images/admin/icon_delete.gif
  30. BIN modules/mopcms/views/{css → }/images/admin/icon_delete.png
  31. BIN modules/mopcms/views/{css → }/images/admin/icon_delete_hover.png
  32. BIN modules/mopcms/views/{css → }/images/admin/icon_download.png
  33. BIN modules/mopcms/views/{css → }/images/admin/icon_folder.gif
  34. BIN modules/mopcms/views/{css → }/images/admin/icon_folder_hover.gif
  35. BIN modules/mopcms/views/{css → }/images/admin/icon_folderadd.gif
  36. BIN modules/mopcms/views/{css → }/images/admin/icon_folderadd_hover.gif
  37. BIN modules/mopcms/views/{css → }/images/admin/icon_folderopen.gif
  38. BIN modules/mopcms/views/{css → }/images/admin/icon_folderopen_hover.gif
  39. BIN modules/mopcms/views/{css → }/images/admin/icon_gif.gif
  40. BIN modules/mopcms/views/{css → }/images/admin/icon_jpg.gif
  41. BIN modules/mopcms/views/{css → }/images/admin/icon_none.gif
  42. BIN modules/mopcms/views/{css → }/images/admin/icon_pdf.gif
  43. BIN modules/mopcms/views/{css → }/images/admin/icon_png.gif
  44. BIN modules/mopcms/views/{css → }/images/admin/icon_published.gif
  45. BIN modules/mopcms/views/{css → }/images/admin/icon_published_hover.gif
  46. BIN modules/mopcms/views/{css → }/images/admin/icon_sort.png
  47. BIN modules/mopcms/views/{css → }/images/admin/icon_sort_hover.png
  48. BIN modules/mopcms/views/{css → }/images/admin/icon_trash.gif
  49. BIN modules/mopcms/views/{css → }/images/admin/icon_unpublished.gif
  50. BIN modules/mopcms/views/{css → }/images/admin/icon_unpublished_hover.gif
  51. BIN modules/mopcms/views/{css → }/images/admin/icon_upload.png
  52. BIN modules/mopcms/views/{css → }/images/admin/icon_view.png
  53. BIN modules/mopcms/views/{css → }/images/admin/navbg.gif
  54. BIN modules/mopcms/views/{css → }/images/admin/spinner.gif
  55. BIN modules/mopcms/views/{css → }/images/admin/switch_handle.png
  56. BIN modules/mopcms/views/{css → }/images/admin/switch_track.png
  57. BIN modules/mopcms/views/{css → }/images/bar.gif
  58. BIN modules/mopcms/views/{css → }/images/bg_row.gif
  59. BIN modules/mopcms/views/{css → }/images/bg_row_alt.gif
  60. BIN modules/mopcms/views/{css → }/images/bg_white60.png
  61. BIN modules/mopcms/views/{css → }/images/bg_white80.png
  62. BIN modules/mopcms/views/{css → }/images/bgk80.png
  63. BIN modules/mopcms/views/{css → }/images/bgk88.png
  64. BIN modules/mopcms/views/{css → }/images/bgk90.png
  65. BIN modules/mopcms/views/{css → }/images/bgk94.png
  66. BIN modules/mopcms/views/{css → }/images/failed.png
  67. BIN modules/mopcms/views/{css → }/images/file.png
  68. BIN modules/mopcms/views/{css → }/images/guideBg.gif
  69. BIN modules/mopcms/views/{css → }/images/icon_add_category.gif
  70. BIN modules/mopcms/views/{css → }/images/icon_addpage.gif
  71. BIN modules/mopcms/views/{css → }/images/icon_addpage.jpg
  72. BIN modules/mopcms/views/{css → }/images/icon_cancel.gif
  73. BIN modules/mopcms/views/{css → }/images/icon_cancel.png
  74. BIN modules/mopcms/views/{css → }/images/icon_cancel_hover.png
  75. BIN modules/mopcms/views/{css → }/images/icon_confirm.gif
  76. BIN modules/mopcms/views/{css → }/images/icon_confirm.png
  77. BIN modules/mopcms/views/{css → }/images/icon_confirm_hover.png
  78. BIN modules/mopcms/views/{css → }/images/icon_delete.gif
  79. BIN modules/mopcms/views/{css → }/images/icon_delete.png
  80. BIN modules/mopcms/views/{css → }/images/icon_delete_hover.png
  81. BIN modules/mopcms/views/{css → }/images/icon_doc.gif
  82. BIN modules/mopcms/views/{css → }/images/icon_download.png
  83. BIN modules/mopcms/views/{css → }/images/icon_folder.gif
  84. BIN modules/mopcms/views/{css → }/images/icon_folder_hover.gif
  85. BIN modules/mopcms/views/{css → }/images/icon_folderadd.gif
  86. BIN modules/mopcms/views/{css → }/images/icon_folderadd_hover.gif
  87. BIN modules/mopcms/views/{css → }/images/icon_folderopen.gif
  88. BIN modules/mopcms/views/{css → }/images/icon_folderopen_hover.gif
  89. BIN modules/mopcms/views/{css → }/images/icon_gif.gif
  90. BIN modules/mopcms/views/{css → }/images/icon_jpg.gif
  91. BIN modules/mopcms/views/{css → }/images/icon_none.gif
  92. BIN modules/mopcms/views/{css → }/images/icon_pdf.gif
  93. BIN modules/mopcms/views/{css → }/images/icon_png.gif
  94. BIN modules/mopcms/views/{css → }/images/icon_published.gif
  95. BIN modules/mopcms/views/{css → }/images/icon_published_hover.gif
  96. BIN modules/mopcms/views/{css → }/images/icon_sort.png
  97. BIN modules/mopcms/views/{css → }/images/icon_sort_hover.png
  98. BIN modules/mopcms/views/{css → }/images/icon_trash.gif
  99. BIN modules/mopcms/views/{css → }/images/icon_unpublished.gif
  100. BIN modules/mopcms/views/{css → }/images/icon_unpublished_hover.gif
  101. BIN modules/mopcms/views/{css → }/images/icon_upload.png
  102. BIN modules/mopcms/views/{css → }/images/icon_view.png
  103. BIN modules/mopcms/views/{css → }/images/navbg.gif
  104. BIN modules/mopcms/views/{css → }/images/progress.gif
  105. BIN modules/mopcms/views/{css → }/images/spinner.gif
  106. BIN modules/mopcms/views/{css → }/images/success.png
  107. BIN modules/mopcms/views/{css → }/images/switch_handle.png
  108. BIN modules/mopcms/views/{css → }/images/switch_track.png
  109. BIN modules/mopcms/views/{css → }/images/uploading.png
  110. +14 −16 modules/mopcms/views/js/mop_cms.js
  111. +18 −8 modules/navigation/views/css/navigation.css
  112. +101 −46 modules/navigation/views/js/navigation.js
  113. +7 −4 modules/navigation/views/navigation.php
@@ -3,11 +3,26 @@
<data>
<item templateName="basicCategory">
- <field name="title">A Category</field>
+ <field name="title">Category 1</field>
<item templateName="basicCategory">
- <field name="title">Category2</field>
+ <field name="title">Category 2</field>
<item templateName="basicCategory">
- <field name="title">Category3</field>
+ <field name="title">Category 3 A</field>
+ </item>
+ <item templateName="basicCategory">
+ <field name="title">Category 3 B</field>
+ <item templateName="basicCategory">
+ <field name="title">Category 4 A</field>
+ </item>
+ <item templateName="basicCategory">
+ <field name="title">Category 4 B</field>
+ </item>
+ <item templateName="basicCategory">
+ <field name="title">Category 4 C</field>
+ </item>
+ </item>
+ <item templateName="basicCategory">
+ <field name="title">Category 3 C</field>
</item>
</item>
</item>
View
@@ -1,10 +1,7 @@
// Section: Setting up environment for MoPCore.
// Redirects ie 6 to a landing page for that browser
-if( Browser.Engine.trident4 ) window.location.href = $(document).getElement("head").getElement("base").get("href") + "msielanding";
-
-/* Note: https://mootools.lighthouseapp.com/projects/2706/tickets/651-classtostring-broken-on-122-big-regression */
-Class.Mutators.toString = Class.Mutators.valueOf = $arguments(0);
+if( Browser.ie && Browser.version < 8 ) window.location.href = $(document).getElement("head").getElement("base").get("href") + "msielanding";
/*
Quick hack to prevent browsers w/o a console, or firebug from generating errors when console functions are called.
@@ -55,6 +52,16 @@ Element.implement({
});
+Function.implement({
+ bindWithEvent: function(bind, args){
+ var self = this;
+ if (args != null) args = Array.from(args);
+ return function(event){
+ return self.apply(bind, (args == null) ? arguments : [event].concat(args));
+ }
+ }
+});
+
/*
Function: String.encodeUTF8
Implements encodeUTF8 into mootools' native String class
@@ -442,7 +449,7 @@ mop.MoPObject = new Class({
this.setOptions( options );
this.element = $( anElementOrId );
this.elementClass = this.element.get("class");
- this.marshal = ( $type( aMarshal ) == "string" )? mop.ModuleManager.getModuleById( aMarshal ) : aMarshal;
+ this.marshal = aMarshal;
this.element.store( 'Class', this );
},
/*
@@ -568,7 +575,7 @@ mop.util.HistoryManager = new Class({
},
getStrippedHash: function( ){
- return $defined( window.location.hash && window.location.hash != "#" )? window.location.hash.substr( 1 , window.location.hash.length ) : null;
+ return ( window.location.hash && window.location.hash != "#" )? window.location.hash.substr( 1 , window.location.hash.length ) : null;
},
checkLocation: function( ){
View
@@ -80,10 +80,11 @@ mop.modules.Module = new Class({
console.log( "\tinitModules", this.toString(), anElement );
descendantModules.each( function( aDescendant ){
descendantModules.each( function( anotherDescendant ){
- if( aDescendant.hasChild( anotherDescendant ) ) filteredOutModules.push( anotherDescendant );
+ console.log( this.toString(), "\tdescendantloop", aDescendant, anotherDescendant, aDescendant.contains( anotherDescendant ) );
+ if( aDescendant.contains( anotherDescendant ) && aDescendant != anotherDescendant ) filteredOutModules.push( anotherDescendant );
}, this );
}, this );
-// console.log( this.toString(), "\t\tfilteredOutModules", filteredOutModules );
+ console.log( this.toString(), "\t\tfilteredOutModules", filteredOutModules );
descendantModules.each( function( aDescendant ){
if( !filteredOutModules.contains( aDescendant ) ){
if( !this.childModules ) this.childModules = new Hash();
@@ -92,7 +93,7 @@ mop.modules.Module = new Class({
this.childModules.set( instanceName, module );
}
}, this );
-// console.log( "childModules", this.toString(), this.childModules );
+ console.log( "childModules", this.toString(), this.childModules );
delete filteredOutModules, descendantModules;
filteredOutModules = descendantModules = null;
},
@@ -111,7 +112,7 @@ mop.modules.Module = new Class({
ref = null;
classPath.each( function( node ){
ref = ( !ref )? this[node] : ref[node];
-// console.log( ref, node );
+ console.log( ref, node );
});
var newModule = new ref( element, this );
return newModule;
@@ -273,7 +274,7 @@ mop.modules.AjaxFormModule = new Class({
if( this.resultsContainer ){
// this.resultsContainer.setStyle( "height", this.resultsContainer.getCoordinates().height );
- this.resultsContainer.addClass( "centeredSpinner" );
+// this.resultsContainer.addClass( "centeredSpinner" );
}
if( this.requiresValidation ){
@@ -310,7 +311,7 @@ mop.modules.AjaxFormModule = new Class({
// console.log( this.toString(), anUIElement.type, anUIElement.fieldName, anUIElement );
if( anUIElement.type != "interfaceWidget" ){
- $extend( keyValuePairs, anUIElement.getKeyValuePair() );
+ keyValuePairs.append( anUIElement.getKeyValuePair() );
}
}, this );
return keyValuePairs;
@@ -332,7 +333,7 @@ mop.modules.AjaxFormModule = new Class({
// console.log( this.toString(), "onFormSubmissionComplete" );
if( this.resultsContainer ){
// this.resultsContainer.setStyle( "height", 'auto' );
- this.resultsContainer.removeClass( "centeredSpinner" );
+// this.resultsContainer.removeClass( "centeredSpinner" );
this.resultsContainer.set( "html", json.html );
}
// log( this.resultsContainer.get( "html" ) );
Oops, something went wrong.

0 comments on commit ae10cbe

Please sign in to comment.