Dos decisiones trascendentales se tomaron durante la última cumbre de mandatarios en la ciudad de Mendoza. Por un lado, se resolvió la suspensión del Paraguay, en protesta a la destitución del presidente constitucional, Fernando Lugo. Por otro lado, se fijó la fecha de la incorporación de Venezuela como un miembro pleno. De esta manera se abre un nuevo panorama político en la región.
+
El 31 de julio será el día en el que se incorpore Venezuela como miembro pleno del Mercosur, con todos los derechos y obligaciones. Si bien los mandatarios de los países del bloque ya habían dado el visto bueno, la decisión pudo hacerse efectiva luego de la suspensión de Paraguay, ya que el Senado guaraní se oponía a la incorporación del país de Hugo Chávez. Con la destitución del presidente Fernando Lugo, luego de un golpe de estado maquillado por un juicio político, los guaraníes quedaron sin voz ni voto dentro del bloque, hasta que se celebren las elecciones en abril próximo.
+
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
+
Venezuela, el nuevo miembro
+
La consolidación de la república bolivariana como quinto integrante del bloque es una idea que se viene gestando desde 2003, cuando Lula Da Silva y Néstor Kirchner ocupaban la presidencia de Brasil y Argentina, respectivamente. Junto con Hugo Chávez promovieron la integración de la región, que se materializó en la creación de la Unión de Naciones Suramericanas (UNASUR) en 2011. La presión continuó para que Venezuela se sume también al bloque del Mercosur con el objetivo de aumentar la unión política de la región y además sumar un aliado comercial fuerte, como lo es el país bolivariano.
+
Venezuela es la tercera economía de América del Sur, por detrás de Argentina y Brasil, y es además la potencia energética de la región. Como principal productor de petróleo del continente, la incorporación al bloque es una alianza económica fundamental para los países miembros. De efectivizarse la asociación de la venezolana Pdvsa y la brasileña Petrobras, la región tendría la empresa más grande de petróleo del mundo, que además podría incluir a la argentina YPF.
+
Sin embargo, no todos los países miembros alientan la entrada de Venezuela. Durante un tiempo Uruguay se opuso a la incorporación del país bolivariano y, pese a que Mujica defendió públicamente la decisión del Mercosur, el partido opositor, el Frente Amplio de Tabaré Vázquez se opuso abiertamente a esta posición alegando que profundiza las asimetrías entre las economías de los países miembros. El senado paraguayo también se había manifestado en contra de la inclusión de Venezuela en el bloque, debido a oponerse a las políticas de Hugo Chávez. Los países miembros aprovecharon la suspensión de los guaraníes para votar la inclusión de Venezuela, que se hará efectiva el 31 de éste mes.
+
Políticamente el gobierno de Chávez obtiene muchas ventajas a partir de su incorporación al Mercosur. A nivel estratégico logra mayor integración con los demás países y se posiciona como una potencia dentro de la región. Por otro lado, Chávez se encuentra en plena campaña electoral y la incorporación al bloque refuta la principal crítica de los partidos de la oposición: el supuesto aislamiento de Venezuela respecto al resto del mundo. También la incorporación al Mercosur le da al presidente venezolano un apoyo muy fuerte que necesita al faltar sólo tres meses de la campaña electoral.
+
+
Paraguay, suspendido
+
La destitución del presidente Fernando Lugo, mediante un golpe de estado de carácter institucional, provocó el repudio de los mandatarios de la región que decidieron suspender los derechos y las obligaciones del país guaraní en el Mercosur hasta que se restituya el orden democrático o se celebren las elecciones presidenciales, previstas para abril próximo. La caída de Lugo es el resultado de una larga crisis institucional, que culminó en un juicio político promovido por el Partido Colorado y apoyado por la oligarquía terrateniente paraguaya, la jerarquía de la Iglesia y las empresas agroquímicas multinacionales.
+
El conflicto de fondo es la complicada situación agraria que se vive en Paraguay, en dónde el 2 por ciento de los propietarios posee el 80 por ciento de las tierras cultivables. Estos grandes terratenientes contaron con el apoyo del tradicional Partido Colorado que ocupó el gobierno durante 61 años, hasta que Fernando Lugo llegó al poder en el 2008 con un fuerte apoyo de las agrupaciones campesinas. Si bien Lugo logró acceder a la presidencia, a nivel político era bastante débil, ya que no contaba con un apoyo significativo en el senado y además tenía en contra a los grupos económicos más fuertes. A esto se le agregó la enfermedad que padeció durante el año pasado y las críticas de la opinión pública por los escándalos sobre sus hijos no reconocidos.
+
La falta de apoyo y la debilidad del gobierno de Lugo hicieron que no pueda cumplir con su promesa de campaña de realizar una reforma agraria en beneficio de los pequeños campesinos. Estos se organizaron y realizaron distintas protestas, entre las cuales se encuentra la toma de una finca en Curuguaty donde, luego de un desalojo, murieron 11 campesinos y 6 policías. Este hecho fue el que desencadenó el pedido de la oposición para someter al presidente a un juicio político, en cual el senado decidió su destitución sin tener en cuenta los plazos estipulados por la ley para este tipo de procedimientos. El vicepresidente, Federico Franco, que defiende a los intereses de la oligarquía paraguaya, ocupa hoy el lugar de Lugo, a la espera de que se celebren las elecciones en abril.
+
En defensa de Lugo salieron los mandatarios de los países miembros de Mercosur que calificaron la destitución del presidente como un golpe de Estado encubierto. La suspensión del Paraguay del bloque es una sanción a esta estrategia política llevada a cabo por la oligarquía agraria que atenta contra la democracia y los derechos del pueblo guaraní.
+
Los dos grandes cambios que se dieron en la última cumbre, la defensa del presidente constitucional de Paraguay y la incorporación de Venezuela al bloque económico, son dos acciones que representan un avance en la unión entre los países de nuestra región.
+
+
+
+
From 46e402ebabca49345c5362ddf451babf9e70398b Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Fri, 18 Oct 2013 03:45:12 -0500
Subject: [PATCH 03/42] added CC attribution license
---
LICENSE | 319 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 319 insertions(+)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1d658d6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,319 @@
+Creative Commons Legal Code
+
+Attribution 3.0 Unported
+
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+ LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+ REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
+ DAMAGES RESULTING FROM ITS USE.
+
+License
+
+THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
+COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
+COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
+AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
+
+BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
+TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
+BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
+CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
+CONDITIONS.
+
+1. Definitions
+
+ a. "Adaptation" means a work based upon the Work, or upon the Work and
+ other pre-existing works, such as a translation, adaptation,
+ derivative work, arrangement of music or other alterations of a
+ literary or artistic work, or phonogram or performance and includes
+ cinematographic adaptations or any other form in which the Work may be
+ recast, transformed, or adapted including in any form recognizably
+ derived from the original, except that a work that constitutes a
+ Collection will not be considered an Adaptation for the purpose of
+ this License. For the avoidance of doubt, where the Work is a musical
+ work, performance or phonogram, the synchronization of the Work in
+ timed-relation with a moving image ("synching") will be considered an
+ Adaptation for the purpose of this License.
+ b. "Collection" means a collection of literary or artistic works, such as
+ encyclopedias and anthologies, or performances, phonograms or
+ broadcasts, or other works or subject matter other than works listed
+ in Section 1(f) below, which, by reason of the selection and
+ arrangement of their contents, constitute intellectual creations, in
+ which the Work is included in its entirety in unmodified form along
+ with one or more other contributions, each constituting separate and
+ independent works in themselves, which together are assembled into a
+ collective whole. A work that constitutes a Collection will not be
+ considered an Adaptation (as defined above) for the purposes of this
+ License.
+ c. "Distribute" means to make available to the public the original and
+ copies of the Work or Adaptation, as appropriate, through sale or
+ other transfer of ownership.
+ d. "Licensor" means the individual, individuals, entity or entities that
+ offer(s) the Work under the terms of this License.
+ e. "Original Author" means, in the case of a literary or artistic work,
+ the individual, individuals, entity or entities who created the Work
+ or if no individual or entity can be identified, the publisher; and in
+ addition (i) in the case of a performance the actors, singers,
+ musicians, dancers, and other persons who act, sing, deliver, declaim,
+ play in, interpret or otherwise perform literary or artistic works or
+ expressions of folklore; (ii) in the case of a phonogram the producer
+ being the person or legal entity who first fixes the sounds of a
+ performance or other sounds; and, (iii) in the case of broadcasts, the
+ organization that transmits the broadcast.
+ f. "Work" means the literary and/or artistic work offered under the terms
+ of this License including without limitation any production in the
+ literary, scientific and artistic domain, whatever may be the mode or
+ form of its expression including digital form, such as a book,
+ pamphlet and other writing; a lecture, address, sermon or other work
+ of the same nature; a dramatic or dramatico-musical work; a
+ choreographic work or entertainment in dumb show; a musical
+ composition with or without words; a cinematographic work to which are
+ assimilated works expressed by a process analogous to cinematography;
+ a work of drawing, painting, architecture, sculpture, engraving or
+ lithography; a photographic work to which are assimilated works
+ expressed by a process analogous to photography; a work of applied
+ art; an illustration, map, plan, sketch or three-dimensional work
+ relative to geography, topography, architecture or science; a
+ performance; a broadcast; a phonogram; a compilation of data to the
+ extent it is protected as a copyrightable work; or a work performed by
+ a variety or circus performer to the extent it is not otherwise
+ considered a literary or artistic work.
+ g. "You" means an individual or entity exercising rights under this
+ License who has not previously violated the terms of this License with
+ respect to the Work, or who has received express permission from the
+ Licensor to exercise rights under this License despite a previous
+ violation.
+ h. "Publicly Perform" means to perform public recitations of the Work and
+ to communicate to the public those public recitations, by any means or
+ process, including by wire or wireless means or public digital
+ performances; to make available to the public Works in such a way that
+ members of the public may access these Works from a place and at a
+ place individually chosen by them; to perform the Work to the public
+ by any means or process and the communication to the public of the
+ performances of the Work, including by public digital performance; to
+ broadcast and rebroadcast the Work by any means including signs,
+ sounds or images.
+ i. "Reproduce" means to make copies of the Work by any means including
+ without limitation by sound or visual recordings and the right of
+ fixation and reproducing fixations of the Work, including storage of a
+ protected performance or phonogram in digital form or other electronic
+ medium.
+
+2. Fair Dealing Rights. Nothing in this License is intended to reduce,
+limit, or restrict any uses free from copyright or rights arising from
+limitations or exceptions that are provided for in connection with the
+copyright protection under copyright law or other applicable laws.
+
+3. License Grant. Subject to the terms and conditions of this License,
+Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
+perpetual (for the duration of the applicable copyright) license to
+exercise the rights in the Work as stated below:
+
+ a. to Reproduce the Work, to incorporate the Work into one or more
+ Collections, and to Reproduce the Work as incorporated in the
+ Collections;
+ b. to create and Reproduce Adaptations provided that any such Adaptation,
+ including any translation in any medium, takes reasonable steps to
+ clearly label, demarcate or otherwise identify that changes were made
+ to the original Work. For example, a translation could be marked "The
+ original work was translated from English to Spanish," or a
+ modification could indicate "The original work has been modified.";
+ c. to Distribute and Publicly Perform the Work including as incorporated
+ in Collections; and,
+ d. to Distribute and Publicly Perform Adaptations.
+ e. For the avoidance of doubt:
+
+ i. Non-waivable Compulsory License Schemes. In those jurisdictions in
+ which the right to collect royalties through any statutory or
+ compulsory licensing scheme cannot be waived, the Licensor
+ reserves the exclusive right to collect such royalties for any
+ exercise by You of the rights granted under this License;
+ ii. Waivable Compulsory License Schemes. In those jurisdictions in
+ which the right to collect royalties through any statutory or
+ compulsory licensing scheme can be waived, the Licensor waives the
+ exclusive right to collect such royalties for any exercise by You
+ of the rights granted under this License; and,
+ iii. Voluntary License Schemes. The Licensor waives the right to
+ collect royalties, whether individually or, in the event that the
+ Licensor is a member of a collecting society that administers
+ voluntary licensing schemes, via that society, from any exercise
+ by You of the rights granted under this License.
+
+The above rights may be exercised in all media and formats whether now
+known or hereafter devised. The above rights include the right to make
+such modifications as are technically necessary to exercise the rights in
+other media and formats. Subject to Section 8(f), all rights not expressly
+granted by Licensor are hereby reserved.
+
+4. Restrictions. The license granted in Section 3 above is expressly made
+subject to and limited by the following restrictions:
+
+ a. You may Distribute or Publicly Perform the Work only under the terms
+ of this License. You must include a copy of, or the Uniform Resource
+ Identifier (URI) for, this License with every copy of the Work You
+ Distribute or Publicly Perform. You may not offer or impose any terms
+ on the Work that restrict the terms of this License or the ability of
+ the recipient of the Work to exercise the rights granted to that
+ recipient under the terms of the License. You may not sublicense the
+ Work. You must keep intact all notices that refer to this License and
+ to the disclaimer of warranties with every copy of the Work You
+ Distribute or Publicly Perform. When You Distribute or Publicly
+ Perform the Work, You may not impose any effective technological
+ measures on the Work that restrict the ability of a recipient of the
+ Work from You to exercise the rights granted to that recipient under
+ the terms of the License. This Section 4(a) applies to the Work as
+ incorporated in a Collection, but this does not require the Collection
+ apart from the Work itself to be made subject to the terms of this
+ License. If You create a Collection, upon notice from any Licensor You
+ must, to the extent practicable, remove from the Collection any credit
+ as required by Section 4(b), as requested. If You create an
+ Adaptation, upon notice from any Licensor You must, to the extent
+ practicable, remove from the Adaptation any credit as required by
+ Section 4(b), as requested.
+ b. If You Distribute, or Publicly Perform the Work or any Adaptations or
+ Collections, You must, unless a request has been made pursuant to
+ Section 4(a), keep intact all copyright notices for the Work and
+ provide, reasonable to the medium or means You are utilizing: (i) the
+ name of the Original Author (or pseudonym, if applicable) if supplied,
+ and/or if the Original Author and/or Licensor designate another party
+ or parties (e.g., a sponsor institute, publishing entity, journal) for
+ attribution ("Attribution Parties") in Licensor's copyright notice,
+ terms of service or by other reasonable means, the name of such party
+ or parties; (ii) the title of the Work if supplied; (iii) to the
+ extent reasonably practicable, the URI, if any, that Licensor
+ specifies to be associated with the Work, unless such URI does not
+ refer to the copyright notice or licensing information for the Work;
+ and (iv) , consistent with Section 3(b), in the case of an Adaptation,
+ a credit identifying the use of the Work in the Adaptation (e.g.,
+ "French translation of the Work by Original Author," or "Screenplay
+ based on original Work by Original Author"). The credit required by
+ this Section 4 (b) may be implemented in any reasonable manner;
+ provided, however, that in the case of a Adaptation or Collection, at
+ a minimum such credit will appear, if a credit for all contributing
+ authors of the Adaptation or Collection appears, then as part of these
+ credits and in a manner at least as prominent as the credits for the
+ other contributing authors. For the avoidance of doubt, You may only
+ use the credit required by this Section for the purpose of attribution
+ in the manner set out above and, by exercising Your rights under this
+ License, You may not implicitly or explicitly assert or imply any
+ connection with, sponsorship or endorsement by the Original Author,
+ Licensor and/or Attribution Parties, as appropriate, of You or Your
+ use of the Work, without the separate, express prior written
+ permission of the Original Author, Licensor and/or Attribution
+ Parties.
+ c. Except as otherwise agreed in writing by the Licensor or as may be
+ otherwise permitted by applicable law, if You Reproduce, Distribute or
+ Publicly Perform the Work either by itself or as part of any
+ Adaptations or Collections, You must not distort, mutilate, modify or
+ take other derogatory action in relation to the Work which would be
+ prejudicial to the Original Author's honor or reputation. Licensor
+ agrees that in those jurisdictions (e.g. Japan), in which any exercise
+ of the right granted in Section 3(b) of this License (the right to
+ make Adaptations) would be deemed to be a distortion, mutilation,
+ modification or other derogatory action prejudicial to the Original
+ Author's honor and reputation, the Licensor will waive or not assert,
+ as appropriate, this Section, to the fullest extent permitted by the
+ applicable national law, to enable You to reasonably exercise Your
+ right under Section 3(b) of this License (right to make Adaptations)
+ but not otherwise.
+
+5. Representations, Warranties and Disclaimer
+
+UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
+OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
+KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
+INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
+FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
+LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
+WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
+OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
+
+6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
+LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
+ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
+ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. Termination
+
+ a. This License and the rights granted hereunder will terminate
+ automatically upon any breach by You of the terms of this License.
+ Individuals or entities who have received Adaptations or Collections
+ from You under this License, however, will not have their licenses
+ terminated provided such individuals or entities remain in full
+ compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
+ survive any termination of this License.
+ b. Subject to the above terms and conditions, the license granted here is
+ perpetual (for the duration of the applicable copyright in the Work).
+ Notwithstanding the above, Licensor reserves the right to release the
+ Work under different license terms or to stop distributing the Work at
+ any time; provided, however that any such election will not serve to
+ withdraw this License (or any other license that has been, or is
+ required to be, granted under the terms of this License), and this
+ License will continue in full force and effect unless terminated as
+ stated above.
+
+8. Miscellaneous
+
+ a. Each time You Distribute or Publicly Perform the Work or a Collection,
+ the Licensor offers to the recipient a license to the Work on the same
+ terms and conditions as the license granted to You under this License.
+ b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
+ offers to the recipient a license to the original Work on the same
+ terms and conditions as the license granted to You under this License.
+ c. If any provision of this License is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of
+ the remainder of the terms of this License, and without further action
+ by the parties to this agreement, such provision shall be reformed to
+ the minimum extent necessary to make such provision valid and
+ enforceable.
+ d. No term or provision of this License shall be deemed waived and no
+ breach consented to unless such waiver or consent shall be in writing
+ and signed by the party to be charged with such waiver or consent.
+ e. This License constitutes the entire agreement between the parties with
+ respect to the Work licensed here. There are no understandings,
+ agreements or representations with respect to the Work not specified
+ here. Licensor shall not be bound by any additional provisions that
+ may appear in any communication from You. This License may not be
+ modified without the mutual written agreement of the Licensor and You.
+ f. The rights granted under, and the subject matter referenced, in this
+ License were drafted utilizing the terminology of the Berne Convention
+ for the Protection of Literary and Artistic Works (as amended on
+ September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
+ Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
+ and the Universal Copyright Convention (as revised on July 24, 1971).
+ These rights and subject matter take effect in the relevant
+ jurisdiction in which the License terms are sought to be enforced
+ according to the corresponding provisions of the implementation of
+ those treaty provisions in the applicable national law. If the
+ standard suite of rights granted under applicable copyright law
+ includes additional rights not granted under this License, such
+ additional rights are deemed to be included in the License; this
+ License is not intended to restrict the license of any rights under
+ applicable law.
+
+
+Creative Commons Notice
+
+ Creative Commons is not a party to this License, and makes no warranty
+ whatsoever in connection with the Work. Creative Commons will not be
+ liable to You or any party on any legal theory for any damages
+ whatsoever, including without limitation any general, special,
+ incidental or consequential damages arising in connection to this
+ license. Notwithstanding the foregoing two (2) sentences, if Creative
+ Commons has expressly identified itself as the Licensor hereunder, it
+ shall have all rights and obligations of Licensor.
+
+ Except for the limited purpose of indicating to the public that the
+ Work is licensed under the CCPL, Creative Commons does not authorize
+ the use by either party of the trademark "Creative Commons" or any
+ related trademark or logo of Creative Commons without the prior
+ written consent of Creative Commons. Any permitted use will be in
+ compliance with Creative Commons' then-current trademark usage
+ guidelines, as may be published on its website or otherwise made
+ available upon request from time to time. For the avoidance of doubt,
+ this trademark restriction does not form part of this License.
+
+ Creative Commons may be contacted at http://creativecommons.org/.
From bf9fd177e5fb883264da388c38cfb4eb4d4c3aa4 Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Tue, 19 Nov 2013 16:48:24 -0600
Subject: [PATCH 04/42] fixed bug where jquery would crash if a text node is
appended to a
#134
---
src/jquery.columnizer.js | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 1790ecb..43b7747 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -48,6 +48,20 @@
options.width = defaults.width;
}
}
+
+ /**
+ * appending a text node to a
will
+ * cause a jquery crash.
+ * so wrap all append() calls and revert to
+ * a simple appendChild() in case it fails
+ */
+ function appendSafe($target, $elem){
+ try{
+ $target.append($elem);
+ }catch(e){
+ $target[0].appendChild($elem[0]);
+ }
+ }
return this.each(function() {
var $inBox = options.target ? $(options.target) : $(this);
@@ -64,7 +78,7 @@
var adjustment = 0;
- $cache.append($(this).contents().clone(true));
+ appendSafe($cache, $(this).contents().clone(true));
// images loading after dom load
// can screw up the column heights,
@@ -78,7 +92,7 @@
var func = function($inBox,$cache){ return function(){
if(!$inBox.data("firstImageLoaded")){
$inBox.data("firstImageLoaded", "true");
- $inBox.empty().append($cache.children().clone(true));
+ appendSafe($inBox.empty(), $cache.children().clone(true));
$inBox.columnize(options);
}
};
@@ -149,7 +163,7 @@
// our column is on a column break, so just end here
return;
}
- $putInHere.append(node);
+ appendSafe($putInHere, $(node));
}
if($putInHere[0].childNodes.length === 0) return;
@@ -184,7 +198,7 @@
columnText = oText;
}
latestTextNode = document.createTextNode(columnText);
- $putInHere.append(latestTextNode);
+ appendSafe($putInHere, $(latestTextNode));
if(oText.length > counter2 && indexOfSpace != -1){
oText = oText.substring(indexOfSpace);
@@ -207,7 +221,7 @@
if($pullOutHere.contents().length){
$pullOutHere.prepend($item);
}else{
- $pullOutHere.append($item);
+ appendSafe($pullOutHere, $item);
}
return $item[0].nodeType == 3;
@@ -244,14 +258,14 @@
//
// ok, we have a columnbreak, so add it into
// the column and exit
- $putInHere.append($clone);
+ appendSafe($putInHere, $clone);
$cloneMe.remove();
}else if (manualBreaks){
// keep adding until we hit a manual break
- $putInHere.append($clone);
+ appendSafe($putInHere, $clone);
$cloneMe.remove();
}else if($clone.get(0).nodeType == 1 && !$clone.hasClass(prefixTheClassName("dontend"))){
- $putInHere.append($clone);
+ appendSafe($putInHere, $clone);
if($clone.is("img") && $parentColumn.height() < targetHeight + 20){
//
// we can't split an img in half, so just add it
@@ -351,7 +365,7 @@
overflow.innerHTML = html;
}else{
- $col.append($destroyable.contents());
+ appendSafe($col, $destroyable.contents());
}
$inBox.data("columnizing", false);
@@ -414,7 +428,7 @@
$inBox.empty();
$inBox.append($("")); //"
$col = $inBox.children(":last");
- $col.append($cache.clone());
+ appendSafe($col, $cache.clone());
maxHeight = $col.height();
$inBox.empty();
From 7fbc54b468a94e43c597a576f0e07f21ade129ea Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Fri, 22 Nov 2013 13:02:09 -0600
Subject: [PATCH 05/42] only add 'split' to the node in the next column if part
of it ended up in the current column
---
src/jquery.columnizer.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 43b7747..5d77e71 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -289,7 +289,7 @@
// it in half, leaving some of it in pullOutHere
$clone.empty();
if(!columnize($clone, $cloneMe, $parentColumn, targetHeight)){
- // this node still has non-text nodes to split
+ // this node may still have non-text nodes to split
// add the split class and then recur
$cloneMe.addClass(prefixTheClassName("split"));
@@ -310,6 +310,7 @@
if($clone.get(0).childNodes.length === 0){
// it was split, but nothing is in it :(
$clone.remove();
+ $cloneMe.removeClass(prefixTheClassName("split"));
}
}
}
From 2ada5ec715dae66bb215b63419515ba272fcbe70 Mon Sep 17 00:00:00 2001
From: Scott Moore
Date: Fri, 7 Mar 2014 21:16:05 -0700
Subject: [PATCH 06/42] The conditional comment for IE6 detection causes an
error with yui-compressor the way it was written. This improvement adds
compatiblity with YUI-Compressor.
---
src/jquery.columnizer.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 5d77e71..8767221 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -526,7 +526,12 @@
}
}
if(options.overflow && !scrollHorizontally){
- var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
+ var IE6 = false;
+ /*@cc_on
+ @if (@_jscript_version < 5.7)
+ IE6 = true;
+ @end
+ @*/
var IE7 = (document.all) && (navigator.appVersion.indexOf("MSIE 7.") != -1);
if(IE6 || IE7){
var html = "";
From 5e707e146a4a8914b6eaf288ea0f5331cb0b587b Mon Sep 17 00:00:00 2001
From: git
Date: Mon, 24 Mar 2014 15:37:32 +0000
Subject: [PATCH 07/42] Add some samples to show correctness
---
samples/sample101.html | 278 ++++++++++++++++++++++++++++
samples/sample102.html | 321 ++++++++++++++++++++++++++++++++
samples/sample103.html | 407 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 1006 insertions(+)
create mode 100644 samples/sample101.html
create mode 100644 samples/sample102.html
create mode 100644 samples/sample103.html
diff --git a/samples/sample101.html b/samples/sample101.html
new file mode 100644
index 0000000..157f064
--- /dev/null
+++ b/samples/sample101.html
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+
+Site changelist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is labelled as a change list not change log, as I am not publishing dates, authors or PM tracking ids. I am the author of everything. This is targeting the site, not the CMS.
+
+
+
Site Changes (old to new);
+
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
Public access, site is now visible;
+
Add university work to the site to maintain parity with my CV;
+
Add a tiny-url feature;
+
Created strapline support (small text below the title);
+
Add support for per-resource CSS and JS;
+
Create a auto generated site-map resource;
+
Adjust the footer again for readability;
+
Add more content;
+
Categorise the system pages to accessgroup 1 (so not in site-map);
+
Add 'Content-Disposition' headers for binary downloads, msie will work properly now;
+
Improve error flowback, so should you somehow break this you are told why it fails;
+
The current codebase is to be a new version as soon as I have have time for the paperwork;
+
Add more content;
+
Re-add constants rather than define()'s, add PHP version constraint fail point;
+
Is now 0.2.0, need to upload to host at some point;
+
Add more test-cases;
+
Confirm and add w3c status. Do not understand their errors on strict xhtml, there is something about singleton tag they dislike. This is on my todo list. Oct 2013: Other people state there may be errors in the w3c validator;
+
Accidentally implement language selection before realise this will never be used;
+
Assorted error flow-back improvements in light of improved test suites;
+
Add more test-cases;
+
Split CV into different jobrole focused editions, add more project pages to website aka “Add more content”;
+
Add robots.txt and support for robots meta;
+
Start to create documentation for platform;
+
Use documentation to determine missing test cases, create more;
+
Use test cases to determine missing documentation, create more (these two items are abit recursive);
+
Add support for additional get args;
+
Add a resource source viewer, second edition added to footer;
+
Make version checking more useful, ought to upgrade code base version numbering;
+
Deploy new version (random fixes as I spot things);
+
Add HTML chunk support for random things that don't fit the current libraries;
+
Add an alternative mechanism for POST functions when the lack of correct syntax hi-lighting makes it hard to edit;
+
Test cases for POST retested, and made more useful;
+
Improve rendering on internal page redirects;
+
In a separate project, create a source form renderer. This will imported into iceline at some point;
+
Fix a batch of undefs I noticed whilst trying to get my sample for JDI to run;
+
Not yet in this project, but add more features to the form renderer in JDI;
+
Add alot of CSS & JS for JDI;
+
Add more articles;
+
The page menus are now run through wiki;
+
Adjusted footer, so all the CSS is in the CSS file, rather than verbatum from w3c, add file modified date text;
+
Saw site in google listings, updated robots file. Need a mechanism to down prioritise old contents in my “external” category, those are mostly older than 2004;
+
Moved the HTML for the menu to the end of the document, hopefully google listing will be more useful now;
+
WikiResource now supports HTML inclusions in the Wiki text, if tagged with '['.'noEscape]' and '['.'/noEscape]' to delimit areas to ignore. Demonstrated on search. This will be refocused as a multi-format-file-protocol in due time, so it resembles the PNG format (only hand editable);
+
Page menu made more useful, it will translate common URL symbols, before rasterisation;
+
Add linked-in URL to footer, as a cross media connection;
+
I am leaving the dates in the footer as a fairly ISO format as I think this is more useful to purpose. The primary use case is discovering cached content, and currency of information;
+
Adjust resource headers and menu at the top of the page, so it renders better on smaller screen sizes;
+
I have wongled enough things so that the nested lists are functioning correctly. This is a negotiation between the resource source file, and the Wiki library, I haven't added any code myself to manage this;
+
Update content again;
+
Add 'share' links to the pages;
+
Improve error handling on dynamically created code in individual resources;
This is labelled as a change list not change log, as I am not publishing dates, authors or PM tracking ids. I am the author of everything. This is targeting the site, not the CMS.
+
Run as standard alone
+
+
+
Site Changes (old to new);
+
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
Public access, site is now visible;
+
Add university work to the site to maintain parity with my CV;
+
Add a tiny-url feature;
+
Created strapline support (small text below the title);
+
Add support for per-resource CSS and JS;
+
Create a auto generated site-map resource;
+
Adjust the footer again for readability;
+
Add more content;
+
Categorise the system pages to accessgroup 1 (so not in site-map);
+
Add 'Content-Disposition' headers for binary downloads, msie will work properly now;
+
Improve error flowback, so should you somehow break this you are told why it fails;
+
The current codebase is to be a new version as soon as I have have time for the paperwork;
+
Add more content;
+
Re-add constants rather than define()'s, add PHP version constraint fail point;
+
Is now 0.2.0, need to upload to host at some point;
+
Add more test-cases;
+
Confirm and add w3c status. Do not understand their errors on strict xhtml, there is something about singleton tag they dislike. This is on my todo list. Oct 2013: Other people state there may be errors in the w3c validator;
+
Accidentally implement language selection before realise this will never be used;
+
Assorted error flow-back improvements in light of improved test suites;
+
Add more test-cases;
+
Split CV into different jobrole focused editions, add more project pages to website aka “Add more content”;
+
Add robots.txt and support for robots meta;
+
Start to create documentation for platform;
+
Use documentation to determine missing test cases, create more;
+
Use test cases to determine missing documentation, create more (these two items are abit recursive);
+
Add support for additional get args;
+
Add a resource source viewer, second edition added to footer;
+
Make version checking more useful, ought to upgrade code base version numbering;
+
Deploy new version (random fixes as I spot things);
+
Add HTML chunk support for random things that don't fit the current libraries;
+
Add an alternative mechanism for POST functions when the lack of correct syntax hi-lighting makes it hard to edit;
+
Test cases for POST retested, and made more useful;
+
Improve rendering on internal page redirects;
+
In a separate project, create a source form renderer. This will imported into iceline at some point;
+
Fix a batch of undefs I noticed whilst trying to get my sample for JDI to run;
+
Not yet in this project, but add more features to the form renderer in JDI;
+
Add alot of CSS & JS for JDI;
+
Add more articles;
+
The page menus are now run through wiki;
+
Adjusted footer, so all the CSS is in the CSS file, rather than verbatum from w3c, add file modified date text;
+
Saw site in google listings, updated robots file. Need a mechanism to down prioritise old contents in my “external” category, those are mostly older than 2004;
+
Moved the HTML for the menu to the end of the document, hopefully google listing will be more useful now;
+
WikiResource now supports HTML inclusions in the Wiki text, if tagged with '['.'noEscape]' and '['.'/noEscape]' to delimit areas to ignore. Demonstrated on search. This will be refocused as a multi-format-file-protocol in due time, so it resembles the PNG format (only hand editable);
+
Page menu made more useful, it will translate common URL symbols, before rasterisation;
+
Add linked-in URL to footer, as a cross media connection;
+
I am leaving the dates in the footer as a fairly ISO format as I think this is more useful to purpose. The primary use case is discovering cached content, and currency of information;
+
Adjust resource headers and menu at the top of the page, so it renders better on smaller screen sizes;
+
I have wongled enough things so that the nested lists are functioning correctly. This is a negotiation between the resource source file, and the Wiki library, I haven't added any code myself to manage this;
+
Update content again;
+
Add 'share' links to the pages;
+
Improve error handling on dynamically created code in individual resources;
This is labelled as a change list not change log, as I am not publishing dates, authors or PM tracking ids. I am the author of everything. This is targeting the site, not the CMS.
+
Run as standard alone
+
+
+
Site Changes (old to new);
+
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
Public access, site is now visible;
+
Add university work to the site to maintain parity with my CV;
+
Add a tiny-url feature;
+
Created strapline support (small text below the title);
+
Add support for per-resource CSS and JS;
+
Create a auto generated site-map resource;
+
Adjust the footer again for readability;
+
Add more content;
+
Categorise the system pages to accessgroup 1 (so not in site-map);
+
Add 'Content-Disposition' headers for binary downloads, msie will work properly now;
+
Improve error flowback, so should you somehow break this you are told why it fails;
+
The current codebase is to be a new version as soon as I have have time for the paperwork;
+
Add more content;
+
Re-add constants rather than define()'s, add PHP version constraint fail point;
+
Is now 0.2.0, need to upload to host at some point;
+
Add more test-cases;
+
Confirm and add w3c status. Do not understand their errors on strict xhtml, there is something about singleton tag they dislike. This is on my todo list. Oct 2013: Other people state there may be errors in the w3c validator;
+
Accidentally implement language selection before realise this will never be used;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Assorted error flow-back improvements in light of improved test suites;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Add more test-cases;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
+
Split CV into different jobrole focused editions, add more project pages to website aka “Add more content”;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Add robots.txt and support for robots meta;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Start to create documentation for platform;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
+
Use documentation to determine missing test cases, create more;
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Use test cases to determine missing documentation, create more (these two items are abit recursive);
+
+
Added the smart quotes back into the content, because they are better typography. This site is UTF-8 and tagged as such;
+
Improve the logging;
+
Upgraded the pips on lists with CSS, need to test on a few versions of msie, will fail over to dots;
+
Spend about a day minorly adjusting wording; stopping nouns from being “magic words”;
+
Redo the “website folder” structure so it reads better (please note not the filesystem);
+
Add footers generated via the Wiki libs, but not part of the stored page;
+
Auto-generate the TOC indexes at the top from the content, not using Wiki, so other renderers can access the TOC;
+
Add minor styling (mostly on the menu at the top);
+
Add more content;
+
Add more content;
+
Spelcheck [sic] everything again;
+
Add a few external pages for CAIN;
+
Rebuild .htaccess, the host doesn't like some of my settings;
+
+
+
Add support for additional get args;
+
Add a resource source viewer, second edition added to footer;
+
Make version checking more useful, ought to upgrade code base version numbering;
+
Deploy new version (random fixes as I spot things);
+
Add HTML chunk support for random things that don't fit the current libraries;
+
Add an alternative mechanism for POST functions when the lack of correct syntax hi-lighting makes it hard to edit;
+
Test cases for POST retested, and made more useful;
+
Improve rendering on internal page redirects;
+
In a separate project, create a source form renderer. This will imported into iceline at some point;
+
Fix a batch of undefs I noticed whilst trying to get my sample for JDI to run;
+
Not yet in this project, but add more features to the form renderer in JDI;
+
Add alot of CSS & JS for JDI;
+
Add more articles;
+
The page menus are now run through wiki;
+
Adjusted footer, so all the CSS is in the CSS file, rather than verbatum from w3c, add file modified date text;
+
Saw site in google listings, updated robots file. Need a mechanism to down prioritise old contents in my “external” category, those are mostly older than 2004;
+
Moved the HTML for the menu to the end of the document, hopefully google listing will be more useful now;
+
WikiResource now supports HTML inclusions in the Wiki text, if tagged with '['.'noEscape]' and '['.'/noEscape]' to delimit areas to ignore. Demonstrated on search. This will be refocused as a multi-format-file-protocol in due time, so it resembles the PNG format (only hand editable);
+
Page menu made more useful, it will translate common URL symbols, before rasterisation;
+
Add linked-in URL to footer, as a cross media connection;
+
I am leaving the dates in the footer as a fairly ISO format as I think this is more useful to purpose. The primary use case is discovering cached content, and currency of information;
+
Adjust resource headers and menu at the top of the page, so it renders better on smaller screen sizes;
+
I have wongled enough things so that the nested lists are functioning correctly. This is a negotiation between the resource source file, and the Wiki library, I haven't added any code myself to manage this;
+
Update content again;
+
Add 'share' links to the pages;
+
Improve error handling on dynamically created code in individual resources;
Updated my test population, to run ALL v1.x features. Some stuff previously was rushed;
+
Update my docs;
+
Add more tests for v2;
+
Add more docs for v2;
+
<format2 gets published to website here, Jan 2013>;
+
Source gets uploaded to source forge;
+
+
+
+
+
+
+
+
+
+
+
From 7c92c3582aef3552be81459f21a9872c6e2e6967 Mon Sep 17 00:00:00 2001
From: git
Date: Mon, 24 Mar 2014 15:39:55 +0000
Subject: [PATCH 08/42] Add the extra renumberByJS() function
---
src/jquery.columnizer.js | 224 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 221 insertions(+), 3 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 8767221..f5c9955 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -5,7 +5,14 @@
(function($){
$.fn.columnize = function(options) {
-
+ this.cols =[];
+ this.offset= 0;
+ this.before=[];
+ this.lastOther=0;
+ this.prevMax =0;
+ this.debug=0;
+ this.setColumnStart =null;
+ this.elipsisText='';
var defaults = {
// default width of columns
@@ -38,7 +45,9 @@
manualBreaks : false,
// previx for all the CSS classes used by this plugin
// default to empty string for backwards compatibility
- cssClassPrefix : ""
+ cssClassPrefix : "",
+ elipsisText:'...',
+ debug:0,
};
options = $.extend(defaults, options);
@@ -48,7 +57,16 @@
options.width = defaults.width;
}
}
-
+ if(typeof options.setColumnStart== 'function') {
+ this.setColumnStart=options.setColumnStart;
+ }
+ if(typeof options.elipsisText== 'string') {
+ this.elipsisText=options.elipsisText;
+ }
+ if(options.debug) { // assert is off by default
+ this.debug=options.debug;
+ }
+
/**
* appending a text node to a
will
* cause a jquery crash.
@@ -641,4 +659,204 @@
}
});
};
+
+$.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
+ this.setList = function($cols, $list, $tag1) {
+ var $parents = this.before.parents();
+ var $rest;
+
+ $rest = $($cols[this.offset-1]).find('>*');
+
+ if( ($rest.last())[0].tagName!=$tag1.toUpperCase()) {
+ if(this.debug) {
+ console.log("Last item in previous column, isn't a list...");
+ }
+ return 0;
+ }
+ $rest = $rest.length;
+ var $tint = 1;
+
+ if(this.lastOther<=0) {
+ $tint = this.before.children().length+1;
+ } else {
+ $tint = $($parents[this.lastOther]).children().length+1;
+ }
+ // if the first LI in the current column is split, decrement, as we want the same number/key
+ if( $($cols[this.offset]).find($tag1+':first li.split').length ) {
+ var $whereElipsis=$($cols[this.offset-1]).find($tag1+':last li:last');
+ if( this.elipsisText==='' ||
+ $($cols[this.offset-1]).find($tag1+':last ~ div').length ||
+ $($cols[this.offset-1]).find($tag1+':last ~ p').length ) {
+ ;
+ } else {
+ if($($whereElipsis).find('ul, ol, dl').length ==0 ) {
+
+ var $txt=$whereElipsis.last().text();
+ // char counting, 'cus MSIE 8 is appearently stupid
+ var $len=$txt.length;
+ if($txt.substring($len-1)==';') {
+ if($txt.substring($len-4)!=this.elipsisText+';') {
+ $txt=$txt.substring(0, $len-1)+this.elipsisText+';';
+ }
+ } else {
+ if($txt.substring($len-3)!=this.elipsisText) {
+ $txt+=this.elipsisText;
+ }
+ }
+ $whereElipsis.last().text($txt);
+ }
+ }
+ // an item in split between two columns. it only holds one key...
+ if($($cols[this.offset]).find($tag1+':first >li.split >'+$tag1).length==0) {
+ $tint--;
+ }
+ }
+ if($rest==1) {
+ // the last column only held one thing, so assume its wrapped to the column before that as well.
+ $tint += this.prevMax ;
+ }
+ if(this.nest>1) {
+ if(this.debug) {
+ console.log("Supposed to be a nested list...decr");
+ }
+ $tint--;
+// some how, id previous list starts split, need secins decrement,
+// if "split" is now correct, reference this
+ var $tt = $($cols[this.offset -1]).find($tag1+':first li.split:first');
+ if($tt.length>0) {
+ if(this.debug) {
+ console.log("Previous column started with a split item, so that count is one less than expected");
+ }
+ $tint--;
+ }
+
+
+ $tt = $($cols[this.offset]).find($tag1+':first li:first').clone();
+ $tt.children().remove();
+ if( $.trim($tt.text()).length>0 ){
+ if(this.debug) {
+ console.log("If that was a complete list in the previous column, don't decr.");
+ }
+ $tint++;
+
+ if($($cols[this.offset-1]).find(">"+$tag1+':last ').children().length==0 ) {
+ if(this.debug) {
+ console.log("unless that was empty, in which case revert");
+ }
+ $tint--;
+ }
+ }
+
+ } else {
+ var $tt = $($cols[this.offset]).find($tag1+':first li:first '+$tag1+".split li.split");
+ if($tt.length>0) {
+ if(this.debug) {
+ console.log("[Nested] Column started with a split item, so that count is one less than expected");
+ }
+ $tint--;
+ }
+
+ }
+
+ if(this.debug) {
+ console.log("Setting the start value to "+$tint+" ("+this.prevMax +")");
+ }
+ if($tint >0) {
+ // if the above computation leads to 0, or an empty list (more likely), don't set, leave as 1
+ if(typeof this.setColumnStart == 'function') {
+ this.setColumnStart($list, $tint);
+ } else {
+ $list.attr('start', $tint);
+ }
+ }
+ return 0;
+ }
+
+ if(typeof $targetId === 'undefined') { $targetId=false; }
+ if(typeof $targetClass === 'undefined') { $targetClass=false; }
+ if(! $targetId && !$targetClass ) {
+ throw "renumberByJS(): Bad param, must pass an id or a class";
+ }
+
+ var $target ='';
+ this.prevMax =1;
+
+ if($targetClass) {
+ $target ="."+$targetClass;
+ } else {
+ $target ="#"+$targetId;
+ }
+ var $tag1 = $searchTag.toLowerCase();
+ var $tag2 = $searchTag.toUpperCase();
+
+ this.cols = $($target);
+ if(this.debug) {
+ console.log("There are "+this.cols.length+" items, looking for "+$tag1);
+ }
+
+ this.before = $(this.cols[0]).find($tag1+':last');
+ this.prevMax = this.before.children().length;
+
+// start at 1, as must compare to previous...
+ for(this.offset=1; this.offset<$parents.length; this.lastOther++) {
+ if($parents[this.lastOther].tagName != $tag2 && $parents[this.lastOther].tagName != "LI") {
+ $found = true;
+ this.lastOther--;
+ break;
+ }
+ }
+
+ this.nest =1;
+ if($(this.cols[this.offset]).find(">"+$tag1+':first li '+$tag1+":first").length) {
+ this.nest = 2;
+ }
+ this.setList(this.cols, $list, $tag1);
+ this.lastOther--;
+ $list = $(this.cols[this.offset]).find($tag1+':first li '+$tag1+":first");
+ if($list.length) {
+// I hope the two columns have same nesting, or its busted
+
+ this.before= $(this.cols[this.offset-1]).find(">"+$tag1+':last li '+$tag1+":last");
+ this.prevMax= 0;
+ this.nest =1;
+ this.setList(this.cols, $list, $tag1);
+ }
+ var $reset = $(this.cols[this.offset-1]).find(">"+$tag1+':last');
+ this.prevMax = $reset.children().length;
+ }
+ }
+ return 0;
+};
+
})(jQuery);
From 446968c2c121af5e5b8dadaa0216afb7104f4a7f Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Mon, 24 Mar 2014 14:46:15 -0500
Subject: [PATCH 09/42] made tests runnable w/o qunit
---
samples/sample101.html | 21 ++-------------------
samples/sample102.html | 8 ++------
samples/sample103.html | 7 ++-----
3 files changed, 6 insertions(+), 30 deletions(-)
diff --git a/samples/sample101.html b/samples/sample101.html
index 157f064..e375b4d 100644
--- a/samples/sample101.html
+++ b/samples/sample101.html
@@ -15,12 +15,8 @@
-
-
-
-
-
-
+
+
diff --git a/samples/sample102.html b/samples/sample102.html
index 4292539..448048c 100644
--- a/samples/sample102.html
+++ b/samples/sample102.html
@@ -15,12 +15,8 @@
-
-
-
-
-
-
+
+
-
+
+
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 33f4ba9..c444c98 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -343,7 +343,20 @@
// it was split, but nothing is in it :(
$clone.remove();
$cloneMe.removeClass(prefixTheClassName("split"));
- }
+ }else if($clone.get(0).childNodes.length == 1){
+ // was the only child node a text node w/ whitespace?
+ var onlyNode = $clone.get(0).childNodes[0];
+ if(onlyNode.nodeType == 3){
+ // text node
+ var whitespace = /\s/;
+ var str = onlyNode.nodeValue;
+ if(whitespace.test(str)){
+ // yep, only a whitespace textnode
+ $clone.remove();
+ $cloneMe.removeClass(prefixTheClassName("split"));
+ }
+ }
+ }
}
}
}
diff --git a/src/jquery.columnizer.min.js b/src/jquery.columnizer.min.js
index a13ea34..b6b5da1 100644
--- a/src/jquery.columnizer.min.js
+++ b/src/jquery.columnizer.min.js
@@ -25,7 +25,7 @@ function split($putInHere,$pullOutHere,$parentColumn,targetHeight){if($putInHere
if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){return;}
if($pullOutHere.contents().length){var $cloneMe=$pullOutHere.contents(":first");if(typeof $cloneMe.get(0)=='undefined'||$cloneMe.get(0).nodeType!=1)return;var $clone=$cloneMe.clone(true);if($cloneMe.hasClass(prefixTheClassName("columnbreak"))){appendSafe($putInHere,$clone);$cloneMe.remove();}else if(manualBreaks){appendSafe($putInHere,$clone);$cloneMe.remove();}else if($clone.get(0).nodeType==1&&!$clone.hasClass(prefixTheClassName("dontend"))){appendSafe($putInHere,$clone);if($clone.is("img")&&$parentColumn.height()
Columnizer will automatically split your 1 div of content into as many columns as will fit the user's browser! If
the browser is resized, columns will be automatically added or removed appropriately.
Bonorum has. His ut cibo quas tantas, vis ut probo adhuc definiebas, has at meis debet vulputate. No sed velit essent suavitate, in pro decore ceteros temporibus, usu in odio offendit theophrastus. Mel labore indoctum cu, ad soleat admodum delicatissimi sed, mei viris tritani ullamcorper eu. Ut vim simul aperiam.
+
Eu eleifend repudiandae has. Mea eu ridens aliquam. Nisl aeque sit ut, posse dolor utinam cum in. Ad timeam sapientem eos, et eripuit inermis nam. Eos integre voluptaria ne, iriure concludaturque ut eum.
+
Vis erant intellegat in. Soleat legere no ius, usu ex laoreet molestie. Sit eu sint inermis. Ea zzril scribentur pro.
+
Tempor essent appetere
+
Ius mutat commune expetendis in. Nam et quas sensibus reprimique, vix no erat soluta suavitate. At mel eius dictas latine. Corrumpit inciderint reformidans sed no, no usu omnis utinam noluisse.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
Probo debet quaestio an eos, no mel assum iracundia delicatissimi, rebum facete utroque sed ex. Eu melius invidunt repudiandae vix, eu paulo reformidans deterruisset duo, solum voluptaria efficiantur ea mel. Qui summo zzril alienum et. Eu est ferri iuvaret, mazim epicurei sententiae ut cum, modo reque intellegat ex vix. Vim eu tibique accusamus, quot electram at qui.
+
Ex iisque eleifend periculis has. Sit aeterno virtute partiendo ei, eam nonumy bonorum adolescens ad. Ut nec suas vocent ornatus, cetero legendos constituam mea ea, pri cu delenit iracundia. Mundi decore nec te.
+
Soleat civibus in pri
+
In petentium erroribus percipitur per. Takimata accommodare ius ut, eam no postulant urbanitas. Qui ei tantas consectetuer, quis dictas euripidis duo ei. Quaeque democritum concludaturque has ne.
+
Blandit insolens constituto vix an. Has diam wisi in, eum unum repudiare no. Sit at virtute rationibus, qui vitae explicari cu. Vim ne singulis voluptatum, sed puto accusata salutandi ei. Ad mel civibus adversarium.
+
Per ne solum vivendo, fabulas dolorem vivendo in pro. Nec duis ignota cotidieque no, an per possit nostrum. Pro detraxit definitionem eu. Vivendo officiis no nam, eu has reque maiestatis percipitur, dolore reprimique accommodare cum ad. No utinam voluptua oportere pri, augue sonet dicant ei sea.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
+
+
Lorem ipsum ne justo
+
Bonorum has. His ut cibo quas tantas, vis ut probo adhuc definiebas, has at meis debet vulputate. No sed velit essent suavitate, in pro decore ceteros temporibus, usu in odio offendit theophrastus. Mel labore indoctum cu, ad soleat admodum delicatissimi sed, mei viris tritani ullamcorper eu. Ut vim simul aperiam.
+
Blandit insolens constituto vix an. Has diam wisi in, eum unum repudiare no. Sit at virtute rationibus, qui vitae explicari cu. Vim ne singulis voluptatum, sed puto accusata salutandi ei. Ad mel civibus adversarium.
+
Ius mutat commune expetendis in. Nam et quas sensibus reprimique, vix no erat soluta suavitate. At mel eius dictas latine. Corrumpit inciderint reformidans sed no, no usu omnis utinam noluisse.
+
Probo debet quaestio an eos, no mel assum iracundia delicatissimi, rebum facete utroque sed ex. Eu melius invidunt repudiandae vix, eu paulo reformidans deterruisset duo, solum voluptaria efficiantur ea mel. Qui summo zzril alienum et. Eu est ferri iuvaret, mazim epicurei sententiae ut cum, modo reque intellegat ex vix. Vim eu tibique accusamus, quot electram at qui.
+
Eu eleifend repudiandae has. Mea eu ridens aliquam. Nisl aeque sit ut, posse dolor utinam cum in. Ad timeam sapientem eos, et eripuit inermis nam. Eos integre voluptaria ne, iriure concludaturque ut eum.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
Vis erant intellegat in. Soleat legere no ius, usu ex laoreet molestie. Sit eu sint inermis. Ea zzril scribentur pro.
+
Tempor essent appetere
+
Ius mutat commune expetendis in. Nam et quas sensibus reprimique, vix no erat soluta suavitate. At mel eius dictas latine. Corrumpit inciderint reformidans sed no, no usu omnis utinam noluisse.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
Blandit insolens constituto vix an. Has diam wisi in, eum unum repudiare no. Sit at virtute rationibus, qui vitae explicari cu. Vim ne singulis voluptatum, sed puto accusata salutandi ei. Ad mel civibus adversarium.
+
Per ne solum vivendo, fabulas dolorem vivendo in pro. Nec duis ignota cotidieque no, an per possit nostrum. Pro detraxit definitionem eu. Vivendo officiis no nam, eu has reque maiestatis percipitur, dolore reprimique accommodare cum ad. No utinam voluptua oportere pri, augue sonet dicant ei sea.
+
Probo debet quaestio an eos, no mel assum iracundia delicatissimi, rebum facete utroque sed ex. Eu melius invidunt repudiandae vix, eu paulo reformidans deterruisset duo, solum voluptaria efficiantur ea mel. Qui summo zzril alienum et. Eu est ferri iuvaret, mazim epicurei sententiae ut cum, modo reque intellegat ex vix. Vim eu tibique accusamus, quot electram at qui.
+
Ex iisque eleifend periculis has. Sit aeterno virtute partiendo ei, eam nonumy bonorum adolescens ad. Ut nec suas vocent ornatus, cetero legendos constituam mea ea, pri cu delenit iracundia. Mundi decore nec te.
+
Soleat civibus in pri
+
In petentium erroribus percipitur per. Takimata accommodare ius ut, eam no postulant urbanitas. Qui ei tantas consectetuer, quis dictas euripidis duo ei. Quaeque democritum concludaturque has ne.
+
Blandit insolens constituto vix an. Has diam wisi in, eum unum repudiare no. Sit at virtute rationibus, qui vitae explicari cu. Vim ne singulis voluptatum, sed puto accusata salutandi ei. Ad mel civibus adversarium.
+
Ius mutat commune expetendis in. Nam et quas sensibus reprimique, vix no erat soluta suavitate. At mel eius dictas latine. Corrumpit inciderint reformidans sed no, no usu omnis utinam noluisse.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
Per ne solum vivendo, fabulas dolorem vivendo in pro. Nec duis ignota cotidieque no, an per possit nostrum. Pro detraxit definitionem eu. Vivendo officiis no nam, eu has reque maiestatis percipitur, dolore reprimique accommodare cum ad. No utinam voluptua oportere pri, augue sonet dicant ei sea.
+
Sit et, an ius nihil apeirian. Eu posse tempor iuvaret cum. No diam dolor sea, postea mnesarchum ne ius, vel no utinam ignota dolores. Malis suscipit accusamus his ne, utinam assentior prodesset ea eam, facer partem antiopam et cum.
+
+
+
+
+
+
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 2a9d515..6e94a29 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -3,14 +3,21 @@
// created by: Adam Wulf @adamwulf, adam.wulf@gmail.com
(function($){
+ var DATA_ORIGINAL_DOM_KEY = 'columnizer-original-dom';
$.fn.columnize = function(options) {
- this.cols =[];
- this.offset= 0;
+ // save original DOM clone as data
+ this.each(function() {
+ var $el = $(this);
+ $el.data(DATA_ORIGINAL_DOM_KEY, $el.clone(true, true));
+ });
+
+ this.cols =[];
+ this.offset= 0;
this.before=[];
- this.lastOther=0;
+ this.lastOther=0;
this.prevMax =0;
- this.debug=0;
+ this.debug=0;
this.setColumnStart =null;
this.elipsisText='';
@@ -27,7 +34,7 @@
overflow : false,
// this function is called after content is columnized
doneFunc : function(){},
- // if the content should be columnized into a
+ // if the content should be columnized into a
// container node other than it's own node
target : false,
// re-columnizing when images reload might make things
@@ -80,7 +87,7 @@
};
}
}
-
+
/**
* appending a text node to a
will
* cause a jquery crash.
@@ -165,7 +172,7 @@
* is a text node, then it will try to split that text node. otherwise
* it will leave the node in $pullOutHere and return with a height
* smaller than targetHeight.
- *
+ *
* Returns a boolean on whether we did some splitting successfully at a text point
* (so we know we don't need to split a real element). return false if the caller should
* split a node if possible to end this column.
@@ -260,7 +267,7 @@
}
/**
- * Split up an element, which is more complex than splitting text. We need to create
+ * Split up an element, which is more complex than splitting text. We need to create
* two copies of the element with it's contents divided between each
*/
function split($putInHere, $pullOutHere, $parentColumn, targetHeight){
@@ -311,7 +318,7 @@
}else if($clone.is("img") || $cloneMe.hasClass(prefixTheClassName("dontsplit"))){
//
// it's either an image that's too tall, or an unsplittable node
- // that's too tall. leave it in the pullOutHere and we'll add it to the
+ // that's too tall. leave it in the pullOutHere and we'll add it to the
// next column
$clone.remove();
}else{
@@ -324,13 +331,13 @@
// this node may still have non-text nodes to split
// add the split class and then recur
$cloneMe.addClass(prefixTheClassName("split"));
-
+
//if this node was ol element, the child should continue the number ordering
if($cloneMe.get(0).tagName == 'OL'){
var startWith = $clone.get(0).childElementCount + $clone.get(0).start;
$cloneMe.attr('start',startWith+1);
}
-
+
if($cloneMe.children().length){
split($clone, $cloneMe, $parentColumn, targetHeight);
}
@@ -492,7 +499,7 @@
}
//
- // We loop as we try and workout a good height to use. We know it initially as an average
+ // We loop as we try and workout a good height to use. We know it initially as an average
// but if the last column is higher than the first ones (which can happen, depending on split
// points) we need to raise 'adjustment'. We try this over a few iterations until we're 'solid'.
//
@@ -572,7 +579,7 @@
}
if(options.overflow && !scrollHorizontally){
var IE6 = false;
- /*@cc_on
+ /*@cc_on
@if (@_jscript_version < 5.7)
IE6 = true;
@end
@@ -687,6 +694,18 @@
});
};
+$.fn.uncolumnize = function() {
+ // revert to initial DOM
+ this.each(function() {
+ var $el = $(this),
+ $clone;
+
+ if($clone = $el.data(DATA_ORIGINAL_DOM_KEY)) {
+ $el.replaceWith($clone);
+ }
+ });
+};
+
$.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
this.setList = function($cols, $list, $tag1) {
var $parents = this.before.parents();
@@ -711,8 +730,8 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
// if the first LI in the current column is split, decrement, as we want the same number/key
if( $($cols[this.offset]).find($tag1+':first li.split').length ) {
var $whereElipsis=$($cols[this.offset-1]).find($tag1+':last li:last');
- if( this.elipsisText==='' ||
- $($cols[this.offset-1]).find($tag1+':last ~ div').length ||
+ if( this.elipsisText==='' ||
+ $($cols[this.offset-1]).find($tag1+':last ~ div').length ||
$($cols[this.offset-1]).find($tag1+':last ~ p').length ) {
;
} else {
@@ -735,7 +754,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
}
// an item in split between two columns. it only holds one key...
if($($cols[this.offset]).find($tag1+':first >li.split >'+$tag1).length==0) {
- $tint--;
+ $tint--;
}
}
if($rest==1) {
@@ -747,7 +766,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
console.log("Supposed to be a nested list...decr");
}
$tint--;
-// some how, id previous list starts split, need secins decrement,
+// some how, id previous list starts split, need secins decrement,
// if "split" is now correct, reference this
var $tt = $($cols[this.offset -1]).find($tag1+':first li.split:first');
if($tt.length>0) {
@@ -796,7 +815,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
$list.attr('start', $tint);
}
}
- return 0;
+ return 0;
}
if(typeof $targetId === 'undefined') { $targetId=false; }
@@ -807,7 +826,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
var $target ='';
this.prevMax =1;
-
+
if($targetClass) {
$target ="."+$targetClass;
} else {
@@ -815,7 +834,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
}
var $tag1 = $searchTag.toLowerCase();
var $tag2 = $searchTag.toUpperCase();
-
+
this.cols = $($target);
if(this.debug) {
console.log("There are "+this.cols.length+" items, looking for "+$tag1);
@@ -830,7 +849,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
console.log("iterating "+this.offset+"...[of "+this.cols.length+"]");
}
// if the first column again, nothing to the left of you, do nothing...
- if(this.offset % $colno==0) {
+ if(this.offset % $colno==0) {
if(this.debug) {
console.log("First column (in theory..)");
}
@@ -838,7 +857,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
this.prevMax = 1;
continue;
}
-
+
this.before = $(this.cols[this.offset-1]).find($tag1+':last');
// if there are no occurences of the searchTag, do nothing
if(this.before.length) {
@@ -863,7 +882,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
break;
}
}
-
+
this.nest =1;
if($(this.cols[this.offset]).find(">"+$tag1+':first li '+$tag1+":first").length) {
this.nest = 2;
@@ -873,7 +892,7 @@ $.fn.renumberByJS=function($searchTag, $colno, $targetId, $targetClass ) {
$list = $(this.cols[this.offset]).find($tag1+':first li '+$tag1+":first");
if($list.length) {
// I hope the two columns have same nesting, or its busted
-
+
this.before= $(this.cols[this.offset-1]).find(">"+$tag1+':last li '+$tag1+":last");
this.prevMax= 0;
this.nest =1;
diff --git a/src/jquery.columnizer.min.js b/src/jquery.columnizer.min.js
index b6b5da1..a4b6fa8 100644
--- a/src/jquery.columnizer.min.js
+++ b/src/jquery.columnizer.min.js
@@ -1,5 +1,5 @@
-(function($){$.fn.columnize=function(options){this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);if(typeof(options.width)=="string"){options.width=parseInt(options.width,10);if(isNaN(options.width)){options.width=defaults.width;}}
+(function($){var DATA_ORIGINAL_DOM_KEY='columnizer-original-dom';$.fn.columnize=function(options){this.each(function(){var $el=$(this);$el.data(DATA_ORIGINAL_DOM_KEY,$el.clone(true,true));});this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);if(typeof(options.width)=="string"){options.width=parseInt(options.width,10);if(isNaN(options.width)){options.width=defaults.width;}}
if(typeof options.setColumnStart=='function'){this.setColumnStart=options.setColumnStart;}
if(typeof options.elipsisText=='string'){this.elipsisText=options.elipsisText;}
if(options.debug){this.debug=options.debug;}
@@ -25,7 +25,7 @@ function split($putInHere,$pullOutHere,$parentColumn,targetHeight){if($putInHere
if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){return;}
if($pullOutHere.contents().length){var $cloneMe=$pullOutHere.contents(":first");if(typeof $cloneMe.get(0)=='undefined'||$cloneMe.get(0).nodeType!=1)return;var $clone=$cloneMe.clone(true);if($cloneMe.hasClass(prefixTheClassName("columnbreak"))){appendSafe($putInHere,$clone);$cloneMe.remove();}else if(manualBreaks){appendSafe($putInHere,$clone);$cloneMe.remove();}else if($clone.get(0).nodeType==1&&!$clone.hasClass(prefixTheClassName("dontend"))){appendSafe($putInHere,$clone);if($clone.is("img")&&$parentColumn.height()
"));}
$inBox.find(prefixTheClassName("column",true)).find(":first"+prefixTheClassName("removeiffirst",true)).remove();$inBox.find(prefixTheClassName("column",true)).find(':last'+prefixTheClassName("removeiflast",true)).remove();$inBox.find(prefixTheClassName("split",true)).find(":first"+prefixTheClassName("removeiffirst",true)).remove();$inBox.find(prefixTheClassName("split",true)).find(':last'+prefixTheClassName("removeiflast",true)).remove();$inBox.data("columnizing",false);if(options.overflow){options.overflow.doneFunc();}
-options.doneFunc();}});};$.fn.renumberByJS=function($searchTag,$colno,$targetId,$targetClass){this.setList=function($cols,$list,$tag1){var $parents=this.before.parents();var $rest;$rest=$($cols[this.offset-1]).find('>*');if(($rest.last())[0].tagName!=$tag1.toUpperCase()){if(this.debug){console.log("Last item in previous column, isn't a list...");}
+options.doneFunc();}});};$.fn.uncolumnize=function(){this.each(function(){var $el=$(this),$clone;if($clone=$el.data(DATA_ORIGINAL_DOM_KEY)){$el.replaceWith($clone);}});};$.fn.renumberByJS=function($searchTag,$colno,$targetId,$targetClass){this.setList=function($cols,$list,$tag1){var $parents=this.before.parents();var $rest;$rest=$($cols[this.offset-1]).find('>*');if(($rest.last())[0].tagName!=$tag1.toUpperCase()){if(this.debug){console.log("Last item in previous column, isn't a list...");}
return 0;}
$rest=$rest.length;var $tint=1;if(this.lastOther<=0){$tint=this.before.children().length+1;}else{$tint=$($parents[this.lastOther]).children().length+1;}
if($($cols[this.offset]).find($tag1+':first li.split').length){var $whereElipsis=$($cols[this.offset-1]).find($tag1+':last li:last');if(this.elipsisText===''||$($cols[this.offset-1]).find($tag1+':last ~ div').length||$($cols[this.offset-1]).find($tag1+':last ~ p').length){;}else{if($($whereElipsis).find('ul, ol, dl').length==0){var $txt=$whereElipsis.last().text();var $len=$txt.length;if($txt.substring($len-1)==';'){if($txt.substring($len-4)!=this.elipsisText+';'){$txt=$txt.substring(0,$len-1)+this.elipsisText+';';}}else{if($txt.substring($len-3)!=this.elipsisText){$txt+=this.elipsisText;}}
From 73040f590623c3bcd46a35281a388ae00ede7a76 Mon Sep 17 00:00:00 2001
From: Christian Stuff
Date: Tue, 26 Jan 2016 21:51:50 +0100
Subject: [PATCH 28/42] Added uncolumnize function to Readme
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index 4bcc6ae..2ea97f4 100644
--- a/README.md
+++ b/README.md
@@ -119,6 +119,11 @@ Columnizer does not add default "dontsplit" or "dontend" classes to your content
$yourContent.find('h1, h2, h3, h4, h5, h6').addClass('dontend');
$yourContent.find('br').addClass('removeiflast').addClass('removeiffirst');
+### Uncolumnize
+
+You can revert your columnized DOM by using the "uncolumnize" function.
+
+ $('selector').uncolumnize();
## Troubleshooting
From 3f102c0544a70ae538b0cccce7ed9297847fe56f Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Wed, 13 Apr 2016 22:55:41 -0500
Subject: [PATCH 29/42] npm... probably #212
---
package.json | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 package.json
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..94adc92
--- /dev/null
+++ b/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "jquery-columnizer",
+ "version": "1.6.2",
+ "description": "The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns.",
+ "main": "src/jquery.columnizer.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/adamwulf/Columnizer-jQuery-Plugin.git"
+ },
+ "keywords": [
+ "jquery",
+ "columns",
+ "columnizer",
+ "text",
+ "layout"
+ ],
+ "author": "Adam Wulf",
+ "license": "SEE LICENSE IN LICENSE",
+ "bugs": {
+ "url": "https://github.com/adamwulf/Columnizer-jQuery-Plugin/issues"
+ },
+ "homepage": "https://github.com/adamwulf/Columnizer-jQuery-Plugin#readme"
+}
From 5870d0b7216a2df95edd6b92147ab4945cc43ee4 Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Thu, 14 Apr 2016 15:31:40 -0500
Subject: [PATCH 30/42] keywords #212
---
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 94adc92..c914cf1 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,8 @@
"columns",
"columnizer",
"text",
- "layout"
+ "layout",
+ "jquery-plugin"
],
"author": "Adam Wulf",
"license": "SEE LICENSE IN LICENSE",
From d2f088c75801054477aca2fd539ad30168f1fcc7 Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Thu, 14 Apr 2016 15:33:37 -0500
Subject: [PATCH 31/42] keywords
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index c914cf1..aba52f2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "jquery-columnizer",
- "version": "1.6.2",
+ "version": "1.6.3",
"description": "The Columnizer jQuery Plugin will automatically layout your content in newspaper column format. You can specify either column width or a static number of columns.",
"main": "src/jquery.columnizer.js",
"scripts": {
From 5df8934c7093e21b3f1ec3ab91ca43d6aab18639 Mon Sep 17 00:00:00 2001
From: Jan Grzegorowski
Date: Sat, 7 Jan 2017 14:30:38 +0100
Subject: [PATCH 32/42] feat: add disableSingle option
---
src/jquery.columnizer.js | 5 ++++-
src/jquery.columnizer.min.js | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 6e94a29..0df4a09 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -53,6 +53,9 @@
precise : false,
// don't automatically layout columns, only use manual columnbreak
manualBreaks : false,
+ // disable single column layout when container width < columnWidth
+ // (useful for horizontally scrollable columns in mobile view)
+ disableSingle : false,
// previx for all the CSS classes used by this plugin
// default to empty string for backwards compatibility
cssClassPrefix : "",
@@ -471,7 +474,7 @@
// if ($inBox.data("columnized") && numCols == $inBox.children().length) {
// return;
// }
- if(numCols <= 1){
+ if(numCols <= 1 && ! options.disableSingle){
return singleColumnizeIt();
}
if($inBox.data("columnizing")) return;
diff --git a/src/jquery.columnizer.min.js b/src/jquery.columnizer.min.js
index a4b6fa8..51f5aad 100644
--- a/src/jquery.columnizer.min.js
+++ b/src/jquery.columnizer.min.js
@@ -1,5 +1,5 @@
-(function($){var DATA_ORIGINAL_DOM_KEY='columnizer-original-dom';$.fn.columnize=function(options){this.each(function(){var $el=$(this);$el.data(DATA_ORIGINAL_DOM_KEY,$el.clone(true,true));});this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);if(typeof(options.width)=="string"){options.width=parseInt(options.width,10);if(isNaN(options.width)){options.width=defaults.width;}}
+(function($){var DATA_ORIGINAL_DOM_KEY='columnizer-original-dom';$.fn.columnize=function(options){this.each(function(){var $el=$(this);$el.data(DATA_ORIGINAL_DOM_KEY,$el.clone(true,true));});this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,disableSingle:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);if(typeof(options.width)=="string"){options.width=parseInt(options.width,10);if(isNaN(options.width)){options.width=defaults.width;}}
if(typeof options.setColumnStart=='function'){this.setColumnStart=options.setColumnStart;}
if(typeof options.elipsisText=='string'){this.elipsisText=options.elipsisText;}
if(options.debug){this.debug=options.debug;}
@@ -42,7 +42,7 @@ function checkDontEndColumn(dom){if(dom.nodeType==3){if(/^\s+$/.test(dom.nodeVal
return false;}
if(dom.nodeType!=1)return false;if($(dom).hasClass(prefixTheClassName("dontend")))return true;if(dom.childNodes.length===0)return false;return checkDontEndColumn(dom.childNodes[dom.childNodes.length-1]);}
function columnizeIt(){adjustment=0;if(lastWidth==$inBox.width())return;lastWidth=$inBox.width();var numCols=Math.round($inBox.width()/options.width);var optionWidth=options.width;var optionHeight=options.height;if(options.columns)numCols=options.columns;if(manualBreaks){numCols=$cache.find(prefixTheClassName("columnbreak",true)).length+1;optionWidth=false;}
-if(numCols<=1){return singleColumnizeIt();}
+if(numCols<=1&&!disableSingle){return singleColumnizeIt();}
if($inBox.data("columnizing"))return;$inBox.data("columnized",true);$inBox.data("columnizing",true);$inBox.empty();$inBox.append($(""));$col=$inBox.children(":last");appendSafe($col,$cache.clone());maxHeight=$col.height();$inBox.empty();var targetHeight=maxHeight/numCols;var firstTime=true;var maxLoops=3;var scrollHorizontally=false;if(options.overflow){maxLoops=1;targetHeight=options.overflow.height;}else if(optionHeight&&optionWidth){maxLoops=1;targetHeight=optionHeight;scrollHorizontally=true;}
for(var loopCount=0;loopCount<20;loopCount++){$inBox.empty();var $destroyable,className,$col,$lastKid;try{$destroyable=$cache.clone(true);}catch(e){$destroyable=$cache.clone();}
$destroyable.css("visibility","hidden");for(var i=0;i"));}
@@ -87,4 +87,4 @@ var $parents=this.before.parents();this.lastOther=0;var $found=false;for(;this.l
this.nest=1;if($(this.cols[this.offset]).find(">"+$tag1+':first li '+$tag1+":first").length){this.nest=2;}
this.setList(this.cols,$list,$tag1);this.lastOther--;$list=$(this.cols[this.offset]).find($tag1+':first li '+$tag1+":first");if($list.length){this.before=$(this.cols[this.offset-1]).find(">"+$tag1+':last li '+$tag1+":last");this.prevMax=0;this.nest=1;this.setList(this.cols,$list,$tag1);}
var $reset=$(this.cols[this.offset-1]).find(">"+$tag1+':last');this.prevMax=$reset.children().length;}}
-return 0;};})(jQuery);
\ No newline at end of file
+return 0;};})(jQuery);
From 5a8a290b06fe003446c677ca23c811245baf137a Mon Sep 17 00:00:00 2001
From: Jan Grzegorowski
Date: Sat, 7 Jan 2017 14:38:53 +0100
Subject: [PATCH 33/42] docs: add disableSingle option description
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 2ea97f4..4e046a2 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,12 @@ Columnizer will add CSS classes to the columns it creates. Each column will have
manualBreaks
Defaults to false. Set to true if you only want to create columns with manual column breaks. If true, then width, height, columns options are ignored.
+
+
disableSingle
+
+Disables single column layout if number of columns is less or equal to 1. Useful to force columns scrolling horizontally on small screens. See demo 5 for an example.
. Default is false.
+
+
From 25f3c88c7ce6e3456a3ac6ecac00efa429e320d4 Mon Sep 17 00:00:00 2001
From: simonmeadows
Date: Fri, 31 Mar 2017 14:13:25 +0100
Subject: [PATCH 34/42] Added preserving thead and tfoot in tables
In the columnize function we can check weather we are in a table by testing the first child of $pullOutHere
If we are in a table we can clone a copy of the and if they exist and store thim in the columnize function that is operating on the table.
When we get to splitting the last element we add the and back to the table in the content source element $pullOutHere
---
src/jquery.columnizer.js | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 0df4a09..00ee7f5 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -186,6 +186,12 @@
* @param targetHeight, the ideal height for the column, get as close as we can to this height
*/
function columnize($putInHere, $pullOutHere, $parentColumn, targetHeight){
+
+ // Variables for dealing with and when splitting tables
+ // As we split a table we need to keep copies of the and to place on each column
+ var $thead;
+ var $tfoot;
+
//
// add as many nodes to the column as we can,
// but stop once our height is too tall
@@ -205,6 +211,25 @@
// our column is on a column break, so just end here
return;
}
+
+ // If we enter a
element make a copy of and
+ // to use each time the
splits
+ if (node.nodeName=='TABLE'){
+ // Check if the table has a header and clone it
+ if ($(node).find('thead').length>0){
+ this.$thead = $(node).find('thead').clone();
+ } else {
+ this.$thead = undefined;
+ }
+ // Check if the table has a footer and clone it
+ if ($(node).find('tfoot').length>0){
+ this.$tfoot = $(node).find('tfoot').clone();
+ } else {
+ this.$tfoot = undefined;
+ }
+ }
+
+
appendSafe($putInHere, $(node));
}
if($putInHere[0].childNodes.length === 0) return;
@@ -370,6 +395,17 @@
}
}
}
+ // If we are in the process of splitting a table, add the and
+ // clones back to $pullOutHere so they are available to move into the next column
+ if($pullOutHere.prop('tagName') == 'TABLE'){
+ if (this.$thead){
+ $pullOutHere.prepend(this.$tfoot);
+ }
+ if (this.$thead) {
+ $pullOutHere.prepend(this.$thead);
+ }
+ }
+
}
From 0d20d114748802f5cf854dfc9f9cd17ef393504e Mon Sep 17 00:00:00 2001
From: Simon Meadows
Date: Sat, 1 Apr 2017 01:17:02 +0100
Subject: [PATCH 35/42] Added test pages for thead and tfoot
---
test/nested_thead_tfoot.html | 1437 ++++++++++++++++++++++++++++++++++
test/thead_tfoot.html | 637 +++++++++++++++
2 files changed, 2074 insertions(+)
create mode 100644 test/nested_thead_tfoot.html
create mode 100644 test/thead_tfoot.html
diff --git a/test/nested_thead_tfoot.html b/test/nested_thead_tfoot.html
new file mode 100644
index 0000000..a83d86d
--- /dev/null
+++ b/test/nested_thead_tfoot.html
@@ -0,0 +1,1437 @@
+
+
+
+
+
+ Columnizer JQuery Plugin thead tfoot test page
+
+
+
+
+
+
+
+
+
+
+
Columnize nested tables with repeating thead and tfoot
+
This is a test page to show how columnizing works with repeating thead and tfoot in nested tables
+
+
+
+
-- Header 1 --
+
-- Header 2 --
+
-- Header 3 --
+
+
+
+
+
-- Footer 1 --
+
-- Footer 2 --
+
-- Footer 3 --
+
+
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
+
+
+
+
Header A
+
Header B
+
Header C
+
Header D
+
+
+
+
+
+
Footer A
+
Footer B
+
Footer C
+
Footer D
+
+
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
+
+
+
+
-- Header Only X --
+
-- Header Only Y --
+
+
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
Column X
+
Column Y
+
+
+
+
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
Column A
+
Column B
+
Column C
+
Column D
+
+
+
+
+
+
+
+
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/thead_tfoot.html b/test/thead_tfoot.html
new file mode 100644
index 0000000..e30e0de
--- /dev/null
+++ b/test/thead_tfoot.html
@@ -0,0 +1,637 @@
+
+
+
+
+
+ Columnizer JQuery Plugin thead tfoot test page
+
+
+
+
+
+
+
+
+
+
+
Columnize with repeating thead and tfoot
+
This is a test page to show how columnizing works with repeating thead and tfoot
+
+
+
+
-- Header 1 --
+
-- Header 2 --
+
-- Header 3 --
+
+
+
+
+
-- Footer 1 --
+
-- Footer 2 --
+
-- Footer 3 --
+
+
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
Column 1
+
Column 2
+
Column 3
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 54dec55cf1610271851d92a4827bd4028b622960 Mon Sep 17 00:00:00 2001
From: Simon Meadows
Date: Sat, 1 Apr 2017 01:17:48 +0100
Subject: [PATCH 36/42] Re-Worked to allow for nested tables
---
src/jquery.columnizer.js | 83 ++++++++++++++++++++++++++++++++--------
1 file changed, 67 insertions(+), 16 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 00ee7f5..c8bdc39 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -64,6 +64,67 @@
};
options = $.extend(defaults, options);
+ // Variable array for holding and from each table
+ // As we split a table we need to keep copies of the and to place on each column
+ var tables = new Array();
+
+ // Find all the table elements in the page
+ $('table').each(function () {
+ // Check if we have not already saved the and
+ if (!$(this).hasClass('tableSaved')) {
+ // Mark the found table by adding the .tableSaved class
+ $(this).addClass('tableSaved')
+ // Give the table a unique ID so we can re-add its elements later
+ $(this).addClass('tableID-' + tables.length)
+ // Save the tables unique ID, , and as an object in our tables array
+ tables.push({
+ tableID: 'tableID-' + tables.length,
+ thead: $(this).find('thead:first').clone(),
+ tfoot: $(this).find('tfoot:first').clone()
+ });
+ }
+ });
+
+ // Function to add and to all tables in $pullOutHere
+ // This function should be called anywhere split() returns as
+ // that is the point where a column is complete and the remaining content
+ // is not going to change until the next columnize() is called
+ function fixTables($pullOutHere) {
+ // Iterate through all of our saved tables
+ for (i = 0; i < tables.length; i++) {
+ // Check if the root element is a table
+ if ($pullOutHere.is("table")) {
+ // Check if the root element has any elements and
+ // is the current table id for this loop
+ if ($pullOutHere.children('tfoot').length == 0 &&
+ $pullOutHere.hasClass(tables[i].tableID)) {
+ // Add the to the table
+ $(tables[i].tfoot).clone().prependTo($pullOutHere);
+ }
+ // Check if the root element has any elements and
+ // is the current table id for this loop
+ if ($pullOutHere.children('thead').length == 0 &&
+ $pullOutHere.hasClass(tables[i].tableID)) {
+ // Add the to the table
+ $(tables[i].thead).clone().prependTo($pullOutHere);
+ }
+ }
+ // Check if there are any child tables to the root element with the current table ID
+ $pullOutHere.find('table .' + tables[i].tableID).each(function () {
+ // Check if the child table has no
+ if ($(this).children('tfoot').length == 0) {
+ // Add the to the table
+ $(tables[i].tfoot).clone().prependTo(this);
+ }
+ // Check if the child table has no
+ if ($(this).children('thead').length == 0) {
+ // Add the to the table
+ $(tables[i].thead).clone().prependTo(this);
+ }
+ });
+ }
+ }
+
if(typeof(options.width) == "string"){
options.width = parseInt(options.width,10);
if(isNaN(options.width)){
@@ -187,11 +248,6 @@
*/
function columnize($putInHere, $pullOutHere, $parentColumn, targetHeight){
- // Variables for dealing with and when splitting tables
- // As we split a table we need to keep copies of the and to place on each column
- var $thead;
- var $tfoot;
-
//
// add as many nodes to the column as we can,
// but stop once our height is too tall
@@ -300,11 +356,15 @@
*/
function split($putInHere, $pullOutHere, $parentColumn, targetHeight){
if($putInHere.contents(":last").find(prefixTheClassName("columnbreak", true)).length){
+ // Fix any tables that have had their and moved
+ fixTables($pullOutHere);
//
// our column is on a column break, so just end here
return;
}
if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){
+ // Fix any tables that have had their and moved
+ fixTables($pullOutHere);
//
// our column is on a column break, so just end here
return;
@@ -395,17 +455,8 @@
}
}
}
- // If we are in the process of splitting a table, add the and
- // clones back to $pullOutHere so they are available to move into the next column
- if($pullOutHere.prop('tagName') == 'TABLE'){
- if (this.$thead){
- $pullOutHere.prepend(this.$tfoot);
- }
- if (this.$thead) {
- $pullOutHere.prepend(this.$thead);
- }
- }
-
+ // Fix any tables that have had their and moved
+ fixTables($pullOutHere);
}
From 2cf78b7f30e89afcbcebf43d2518628fa5f161f2 Mon Sep 17 00:00:00 2001
From: Simon Meadows
Date: Sat, 1 Apr 2017 01:23:36 +0100
Subject: [PATCH 37/42] moved test to samples
---
test/nested_thead_tfoot.html => samples/nested_table_headers.html | 0
test/thead_tfoot.html => samples/table_headers.html | 0
2 files changed, 0 insertions(+), 0 deletions(-)
rename test/nested_thead_tfoot.html => samples/nested_table_headers.html (100%)
rename test/thead_tfoot.html => samples/table_headers.html (100%)
diff --git a/test/nested_thead_tfoot.html b/samples/nested_table_headers.html
similarity index 100%
rename from test/nested_thead_tfoot.html
rename to samples/nested_table_headers.html
diff --git a/test/thead_tfoot.html b/samples/table_headers.html
similarity index 100%
rename from test/thead_tfoot.html
rename to samples/table_headers.html
From ac92a9ca34091a416bc7d91e4b24b5258756d446 Mon Sep 17 00:00:00 2001
From: Simon Meadows
Date: Sat, 1 Apr 2017 01:39:27 +0100
Subject: [PATCH 38/42] removed non required bit I missed
---
src/jquery.columnizer.js | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index c8bdc39..4aaf455 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -268,24 +268,6 @@
return;
}
- // If we enter a
element make a copy of and
- // to use each time the
splits
- if (node.nodeName=='TABLE'){
- // Check if the table has a header and clone it
- if ($(node).find('thead').length>0){
- this.$thead = $(node).find('thead').clone();
- } else {
- this.$thead = undefined;
- }
- // Check if the table has a footer and clone it
- if ($(node).find('tfoot').length>0){
- this.$tfoot = $(node).find('tfoot').clone();
- } else {
- this.$tfoot = undefined;
- }
- }
-
-
appendSafe($putInHere, $(node));
}
if($putInHere[0].childNodes.length === 0) return;
From 7b6a532f034c98d9cd6fa3b64533b59391d39a08 Mon Sep 17 00:00:00 2001
From: Daniel Heffner
Date: Mon, 19 Aug 2019 11:04:20 -0400
Subject: [PATCH 39/42] master: Fix for jQuery deprecation of event shorthand:
resize
---
src/jquery.columnizer.js | 2 +-
src/jquery.columnizer.min.js | 21 ++++++++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/jquery.columnizer.js b/src/jquery.columnizer.js
index 4aaf455..7536e0b 100644
--- a/src/jquery.columnizer.js
+++ b/src/jquery.columnizer.js
@@ -212,7 +212,7 @@
columnizeIt();
if(!options.buildOnce){
- $(window).resize(function() {
+ $(window).on('resize', function() {
if(!options.buildOnce){
if($inBox.data("timeout")){
clearTimeout($inBox.data("timeout"));
diff --git a/src/jquery.columnizer.min.js b/src/jquery.columnizer.min.js
index 51f5aad..ea7d311 100644
--- a/src/jquery.columnizer.min.js
+++ b/src/jquery.columnizer.min.js
@@ -1,5 +1,11 @@
-(function($){var DATA_ORIGINAL_DOM_KEY='columnizer-original-dom';$.fn.columnize=function(options){this.each(function(){var $el=$(this);$el.data(DATA_ORIGINAL_DOM_KEY,$el.clone(true,true));});this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,disableSingle:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);if(typeof(options.width)=="string"){options.width=parseInt(options.width,10);if(isNaN(options.width)){options.width=defaults.width;}}
+(function($){var DATA_ORIGINAL_DOM_KEY='columnizer-original-dom';$.fn.columnize=function(options){this.each(function(){var $el=$(this);$el.data(DATA_ORIGINAL_DOM_KEY,$el.clone(true,true));});this.cols=[];this.offset=0;this.before=[];this.lastOther=0;this.prevMax=0;this.debug=0;this.setColumnStart=null;this.elipsisText='';var defaults={width:400,columns:false,buildOnce:false,overflow:false,doneFunc:function(){},target:false,ignoreImageLoading:true,columnFloat:"left",lastNeverTallest:false,accuracy:false,precise:false,manualBreaks:false,disableSingle:false,cssClassPrefix:"",elipsisText:'...',debug:0};options=$.extend(defaults,options);var tables=new Array();$('table').each(function(){if(!$(this).hasClass('tableSaved')){$(this).addClass('tableSaved')
+$(this).addClass('tableID-'+tables.length)
+tables.push({tableID:'tableID-'+tables.length,thead:$(this).find('thead:first').clone(),tfoot:$(this).find('tfoot:first').clone()});}});function fixTables($pullOutHere){for(i=0;i');var lastWidth=0;var columnizing=false;var manualBreaks=options.manualBreaks;var cssClassPrefix=defaults.cssClassPrefix;if(typeof(options.cssClassPrefix)=="string"){cssClassPrefix=options.cssClassPrefix;}
var adjustment=0;appendSafe($cache,$(this).contents().clone(true));if(!options.ignoreImageLoading&&!options.target){if(!$inBox.data("imageLoaded")){$inBox.data("imageLoaded",true);if($(this).find("img").length>0){var func=function($inBox,$cache){return function(){if(!$inBox.data("firstImageLoaded")){$inBox.data("firstImageLoaded","true");appendSafe($inBox.empty(),$cache.children().clone(true));$inBox.columnize(options);}};}($(this),$cache);$(this).find("img").one("load",func);$(this).find("img").one("abort",func);return;}}}
-$inBox.empty();columnizeIt();if(!options.buildOnce){$(window).resize(function(){if(!options.buildOnce){if($inBox.data("timeout")){clearTimeout($inBox.data("timeout"));}
+$inBox.empty();columnizeIt();if(!options.buildOnce){$(window).on('resize',function(){if(!options.buildOnce){if($inBox.data("timeout")){clearTimeout($inBox.data("timeout"));}
$inBox.data("timeout",setTimeout(columnizeIt,200));}});}
function prefixTheClassName(className,withDot){var dot=withDot?".":"";if(cssClassPrefix.length){return dot+cssClassPrefix+"-"+className;}
return dot+className;}
@@ -21,11 +27,12 @@ if($parentColumn.height()>=targetHeight&&latestTextNode!==null){$putInHere[0].re
if(oText.length){$item[0].nodeValue=oText;}else{return false;}}
if($pullOutHere.contents().length){$pullOutHere.prepend($item);}else{appendSafe($pullOutHere,$item);}
return $item[0].nodeType==3;}
-function split($putInHere,$pullOutHere,$parentColumn,targetHeight){if($putInHere.contents(":last").find(prefixTheClassName("columnbreak",true)).length){return;}
-if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){return;}
+function split($putInHere,$pullOutHere,$parentColumn,targetHeight){if($putInHere.contents(":last").find(prefixTheClassName("columnbreak",true)).length){fixTables($pullOutHere);return;}
+if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){fixTables($pullOutHere);return;}
if($pullOutHere.contents().length){var $cloneMe=$pullOutHere.contents(":first");if(typeof $cloneMe.get(0)=='undefined'||$cloneMe.get(0).nodeType!=1)return;var $clone=$cloneMe.clone(true);if($cloneMe.hasClass(prefixTheClassName("columnbreak"))){appendSafe($putInHere,$clone);$cloneMe.remove();}else if(manualBreaks){appendSafe($putInHere,$clone);$cloneMe.remove();}else if($clone.get(0).nodeType==1&&!$clone.hasClass(prefixTheClassName("dontend"))){appendSafe($putInHere,$clone);if($clone.is("img")&&$parentColumn.height()"));$col=$inBox.children(":last");appendSafe($col,$cache.clone());maxHeight=$col.height();$inBox.empty();var targetHeight=maxHeight/numCols;var firstTime=true;var maxLoops=3;var scrollHorizontally=false;if(options.overflow){maxLoops=1;targetHeight=options.overflow.height;}else if(optionHeight&&optionWidth){maxLoops=1;targetHeight=optionHeight;scrollHorizontally=true;}
for(var loopCount=0;loopCount<20;loopCount++){$inBox.empty();var $destroyable,className,$col,$lastKid;try{$destroyable=$cache.clone(true);}catch(e){$destroyable=$cache.clone();}
$destroyable.css("visibility","hidden");for(var i=0;i"));}
@@ -87,4 +94,4 @@ var $parents=this.before.parents();this.lastOther=0;var $found=false;for(;this.l
this.nest=1;if($(this.cols[this.offset]).find(">"+$tag1+':first li '+$tag1+":first").length){this.nest=2;}
this.setList(this.cols,$list,$tag1);this.lastOther--;$list=$(this.cols[this.offset]).find($tag1+':first li '+$tag1+":first");if($list.length){this.before=$(this.cols[this.offset-1]).find(">"+$tag1+':last li '+$tag1+":last");this.prevMax=0;this.nest=1;this.setList(this.cols,$list,$tag1);}
var $reset=$(this.cols[this.offset-1]).find(">"+$tag1+':last');this.prevMax=$reset.children().length;}}
-return 0;};})(jQuery);
+return 0;};})(jQuery);
\ No newline at end of file
From b2d64e775ae279c04ecb4b450c8ca567a566aea3 Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Tue, 20 Aug 2019 02:03:31 -0500
Subject: [PATCH 40/42] Proper php tag
---
tools/compress.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/compress.php b/tools/compress.php
index a59c1c7..961856b 100644
--- a/tools/compress.php
+++ b/tools/compress.php
@@ -1,4 +1,4 @@
-
+
Date: Sun, 11 Apr 2021 00:02:29 -0500
Subject: [PATCH 41/42] github sponsorship
---
.github/FUNDING.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..854756b
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: adamwulf
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
From 9292f215c1eadb7e41abf39a3c56d73d7ae82083 Mon Sep 17 00:00:00 2001
From: Adam Wulf
Date: Sun, 11 Apr 2021 00:41:16 -0500
Subject: [PATCH 42/42] updated readme
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 4e046a2..cd1970e 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+## Support
+
+Has Columnizer saved you hours? Become a [Github Sponsor](https://github.com/sponsors/adamwulf) and buy me a coffee ☕️ 😄
+
## Documentation
### CSS Classes for Created Columns