Merge branch 'master' into us-detail

Conflicts:
	app/fonts/taiga.eot
	app/fonts/taiga.ttf
	app/fonts/taiga.woff
	app/partials/views/modules/backlog-table.jade
	app/styles/main.scss
	app/styles/modules/backlog-table.scss
stable
Xavier Julián 2014-06-23 09:19:46 +02:00
commit bd8c2df7c3
92 changed files with 4673 additions and 548 deletions

3
.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"directory" : "app/vendor"
}

5
.gitignore vendored
View File

@ -1,4 +1,7 @@
.sass-cache/ .sass-cache/
bower_components/
dist/ dist/
node_modules/ node_modules/
app/vendor
config/main.coffee
bower_components
app/coffee/modules/locales/locale*.coffee

20
AUTHORS.rst Normal file
View File

@ -0,0 +1,20 @@
The PRIMARY AUTHORS are:
- Andrey Antukh <niwi@niwi.be>
- Jesus Espino Garcia <jespinog@gmail.com>
- David Barragán Merino <bameda@dbarragan.com>
- Xavi Julian <xavier.julian@kaleidos.net>
- Alejandro Alonso <alejandro.alonso@kaleidos.net>
- Anler Hernández <hello@anler.me>
- Juan Francisco Alcántara <juanfran.alcantara@kaleidos.net>
Special thanks to Kaleidos Open Source S.L. for provice time for taiga
development.
And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, reported bugs, added translations, helped
answer newbie questions, and generally made taiga that much better:
- Pilar Esteban <pilar.esteban@gmail.com>
- Guilhem Got <guilhem.got@gmail.com>
...

661
LICENSE Normal file
View File

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

85
app/coffee/app.coffee Normal file
View File

@ -0,0 +1,85 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: app.coffee
###
@taiga = taiga = {}
configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $compileProvider, $gmUrlsProvider) ->
$routeProvider.when('/project/:pslug/backlog', {templateUrl: '/partials/backlog.html'})
$routeProvider.otherwise({redirectTo: '/login'})
$locationProvider.html5Mode(true);
defaultHeaders = {
"Content-Type": "application/json"
"Accept-Language": "en"
}
$httpProvider.defaults.headers.delete = defaultHeaders
$httpProvider.defaults.headers.patch = defaultHeaders
$httpProvider.defaults.headers.post = defaultHeaders
$httpProvider.defaults.headers.put = defaultHeaders
$httpProvider.defaults.headers.get = {}
# authHttpIntercept = ($q, $location) ->
# return (promise) ->
# return promise.then null, (response) ->
# if response.status == 401 or response.status == 0
# $location.url("/login?next=#{$location.path()}")
# return $q.reject(response)
# $provide.factory("authHttpIntercept", ["$q", "$location", authHttpIntercept])
# $httpProvider.responseInterceptors.push('authHttpIntercept')
init = ($log, $i18n, $config, $rootscope) ->
$i18n.initialize($config.get("defaultLanguage"))
$log.debug("Initialize application")
configure.$inject = ["$routeProvider", "$locationProvider", "$httpProvider"]
init.$inject = ["$log", "$tgI18n", "$tgConfig","$rootScope"]
modules = [
# Main Modules
"taigaConfig",
"taigaBase",
"taigaResources",
"taigaLocales",
"taigaAuth",
"taigaNavigation",
# Specific Modules
"taigaBacklog",
# Vendor modules
"ngRoute",
"ngAnimate",
]
# Default Value for taiga local config module.
angular.module("taigaLocalConfig", []).value("localconfig", {})
# Main module definition
module = angular.module("taiga", modules)
module.config(configure)
module.run(init)

28
app/coffee/classes.coffee Normal file
View File

@ -0,0 +1,28 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: classes.coffee
###
class TaigaBase
class TaigaService extends TaigaBase
class TaigaController extends TaigaBase
@.taiga.Base = TaigaBase
@.taiga.Service = TaigaService
@.taiga.Controller = TaigaController

50
app/coffee/config.coffee Normal file
View File

@ -0,0 +1,50 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: config.coffee
###
taiga = @.taiga
class ConfigService extends taiga.Service
defaults: {
host: "localhost:8000"
scheme: "http"
defaultLanguage: "en"
debug: false
languageOptions: {
"es": "Spanish"
"en": "English"
}
}
initialize: (localconfig) ->
defaults = _.clone(@.defaults, true)
@.config = _.merge(defaults, localconfig)
get: (key, defaultValue=null) ->
return @.config[key] || defaultValue
# Initialize config loading local configuration.
init = ($log, localconfig, config) ->
$log.debug("Initializing configuration", localconfig)
config.initialize(localconfig)
module = angular.module("taigaConfig", ["taigaLocalConfig"])
module.service("$tgConfig", ConfigService)
module.run(["$log", "localconfig", "$tgConfig", init])

View File

@ -0,0 +1,77 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/auth.coffee
###
taiga = @.taiga
class AuthService extends taiga.Service
@.$inject = ["$rootScope", "$tgStorage", "$tgModel", "$tgHttp"]
constructor: (@rootscope, @storage, @model, @http) ->
super()
getUser: ->
if @rootscope.user
return @rootscope.user
userData = @storage.get("userInfo")
if userData
user = @model.make_model("users", userData)
@rootscope.user = user
return user
return null
setUser: (user) ->
@rootscope.auth = user
@rootscope.$broadcast("i18n:change", user.default_language)
@storage.set("userInfo", user.getAttrs())
clear: ->
@rootscope.auth = null
@storage.remove("userInfo")
setToken: (token) ->
@storage.set("token", token)
getToken: ->
return @storage.get("token")
login: (username, password) ->
url = @urls.resolve("auth")
data = {
username: username
password: password
}
return @http.post(url, data).then (data, status) =>
user = @model.make_model("users", data)
@.setToken(data["auth_token"])
@.setUser(user)
return user
isAuthenticated: ->
if @.getUser() != null
return true
return false
module = angular.module("taigaAuth", ["taigaResources"])
module.service("$tgAuth", AuthService)

View File

@ -0,0 +1,22 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/backlog.coffee
###
module = angular.module("taigaBacklog", [])

View File

@ -0,0 +1,88 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/backlog/lightboxes.coffee
###
CreateEditUserstoryDirective = ($repo, $model) ->
link = ($scope, $el, attrs) ->
$scope.us = {}
# TODO: defaults
$scope.$on "usform:new", ->
$scope.us = {}
$el.removeClass("hidden")
$scope.$on "usform:edit", (ctx, us) ->
$el.removeClass("hidden")
$scope.us = us
$scope.$on "$destroy", ->
$el.off()
# Dom Event Handlers
$el.on "click", ".markdown-preview a", (event) ->
event.preventDefault()
target = angular.element(event.currentTarget)
target.parent().find("a").removeClass("active")
target.addClass("active")
$el.on "click", ".close", (event) ->
event.preventDefault()
$el.addClass("hidden")
$el.on "click", ".button-green", (event) ->
event.preventDefault()
console.log $scope.us
return {link: link}
CreateBulkUserstroriesDirective = ($repo, $rs, $rootscope) ->
link = ($scope, $el, attrs) ->
$scope.form = {data: ""}
$scope.$on "usform:bulk", ->
$el.removeClass("hidden")
$scope.form = {data: ""}
$el.on "click", ".close", (event) ->
event.preventDefault()
$el.addClass("hidden")
$el.on "click", ".button-green", (event) ->
event.preventDefault()
data = $scope.form.data
projectId = $scope.projectId
$rs.userstories.bulkCreate(projectId, data).then (result) ->
$rootscope.$broadcast("usform:bulk:success", result)
$el.addClass("hidden")
return {link: link}
module = angular.module("taigaBacklog")
module.directive("tgLbCreateEditUserstory", ["$tgRepo", "$tgModel", CreateEditUserstoryDirective])
module.directive("tgLbCreateBulkUserstories", [
"$tgRepo",
"$tgResources",
"$rootScope",
CreateBulkUserstroriesDirective
])

View File

@ -0,0 +1,316 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/backlog/main.coffee
###
taiga = @.taiga
mixOf = @.taiga.mixOf
class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin)
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q) ->
_.bindAll(@)
promise = @.loadInitialData()
promise.then null, =>
console.log "FAIL"
@rootscope.$on("usform:bulk:success", @.loadUserstories)
loadSprints: ->
return @rs.sprints.list(@scope.projectId).then (sprints) =>
@scope.sprints = sprints
return sprints
loadUserstories: ->
return @rs.userstories.listUnassigned(@scope.projectId).then (userstories) =>
@scope.userstories = userstories
@scope.filters = @.generateFilters()
@.filterVisibleUserstories()
return userstories
loadBacklog: ->
return @q.all([
@.loadSprints(),
@.loadUserstories()
])
loadProject: ->
return @rs.projects.get(@scope.projectId).then (project) =>
@scope.project = project
@scope.points = _.sortBy(project.points, "order")
@scope.statusList = _.sortBy(project.us_statuses, "id")
return project
loadInitialData: ->
# Resolve project slug
promise = @repo.resolve({pslug: @params.pslug}).then (data) =>
@scope.projectId = data.project
return data
return promise.then(=> @.loadProject())
.then(=> @.loadUsersAndRoles())
.then(=> @.loadBacklog())
filterVisibleUserstories: ->
selectedTags = _.filter(@scope.filters.tags, "selected")
selectedTags = _.map(selectedTags, "name")
@scope.visibleUserstories = []
if selectedTags.length == 0
@scope.visibleUserstories = _.clone(@scope.userstories, false)
else
@scope.visibleUserstories = _.reject @scope.userstories, (us) =>
if _.intersection(selectedTags, us.tags).length == 0
return true
else
return false
generateFilters: ->
filters = {}
plainTags = _.flatten(_.map(@scope.userstories, "tags"))
filters.tags = _.map(_.countBy(plainTags), (v, k) -> {name: k, count:v})
return filters
## Template actions
editUserStory: (us) ->
@rootscope.$broadcast("usform:edit", us)
deleteUserStory: (us) ->
title = "Delete User Story"
subtitle = us.subject
@confirm.ask(title, subtitle).then =>
console.log "#TODO"
addNewUs: (type) ->
switch type
when "standard" then @rootscope.$broadcast("usform:new")
when "bulk" then @rootscope.$broadcast("usform:bulk")
#############################################################################
## Backlog Directive
#############################################################################
BacklogDirective = ($repo) ->
#########################
## Drag & Drop Link
#########################
linkSortable = ($scope, $el, $attrs, $ctrl) ->
resortAndSave = ->
toSave = []
for item, i in $scope.userstories
if item.order == i
continue
item.order = i
toSave = _.filter($scope.userstories, (x) -> x.isModified())
$repo.saveAll(toSave).then ->
console.log "FINISHED", arguments
onUpdateItem = (event) ->
console.log "onUpdate", event
item = angular.element(event.item)
itemScope = item.scope()
ids = _.map($scope.userstories, "id")
index = ids.indexOf(itemScope.us.id)
$scope.userstories.splice(index, 1)
$scope.userstories.splice(item.index(), 0, itemScope.us)
resortAndSave()
onAddItem = (event) ->
item = angular.element(event.item)
itemScope = item.scope()
itemIndex = item.index()
itemScope.us.milestone = null
userstories = $scope.userstories
userstories.splice(itemIndex, 0, itemScope.us)
item.remove()
item.off()
$scope.$apply()
resortAndSave()
onRemoveItem = (event) ->
item = angular.element(event.item)
itemScope = item.scope()
ids = _.map($scope.userstories, "id")
index = ids.indexOf(itemScope.us.id)
if index != -1
userstories = $scope.userstories
userstories.splice(index, 1)
item.off()
itemScope.$destroy()
dom = $el.find(".backlog-table-body")
sortable = new Sortable(dom[0], {
group: "backlog",
selector: ".us-item-row",
onUpdate: onUpdateItem
onAdd: onAddItem
onRemove: onRemoveItem
})
#########################
## Filters Link
#########################
linkFilters = ($scope, $el, $attrs, $ctrl) ->
$scope.filtersSearch = {}
$el.on "click", "#show-filters-button", (event) ->
event.preventDefault()
$el.find("sidebar.filters-bar").toggle()
$el.on "click", "section.filters a.single-filter", (event) ->
event.preventDefault()
target = angular.element(event.currentTarget)
targetScope = target.scope()
$scope.$apply ->
targetScope.tag.selected = not (targetScope.tag.selected or false)
$ctrl.filterVisibleUserstories()
link = ($scope, $el, $attrs) ->
$ctrl = $el.controller()
linkSortable($scope, $el, $attrs, $ctrl)
linkFilters($scope, $el, $attrs, $ctrl)
$scope.$on "$destroy", ->
$el.off()
return {link: link}
#############################################################################
## Sprint Directive
#############################################################################
BacklogSprintDirective = ($repo) ->
link = ($scope, $el, $attrs) ->
$ctrl = $el.closest("div.wrapper").controller()
sprint = $scope.$eval($attrs.tgBacklogSprint)
if $scope.$first
$el.addClass("sprint-current")
if sprint.closed
$el.addClass("sprint-closed")
# Event Handlers
$el.on "click", ".sprint-summary > a", (event) ->
$el.find(".sprint-table").toggle()
$scope.$on "$destroy", ->
$el.off()
# Drag & Drop
resortAndSave = ->
toSave = []
for item, i in $scope.sprint.user_stories
if item.order == i
continue
item.order = i
toSave = _.filter($scope.sprint.user_stories, (x) -> x.isModified())
$repo.saveAll(toSave).then ->
console.log "FINISHED", arguments
onUpdateItem = (event) ->
item = angular.element(event.item)
itemScope = item.scope()
ids = _.map($scope.sprint.user_stories, {"id": itemScope.us.id})
index = ids.indexOf(itemScope.us.id)
$scope.sprint.user_stories.splice(index, 1)
$scope.sprint.user_stories.splice(item.index(), 0, itemScope.us)
resortAndSave()
onAddItem = (event) ->
item = angular.element(event.item)
itemScope = item.scope()
itemIndex = item.index()
itemScope.us.milestone = $scope.sprint.id
userstories = $scope.sprint.user_stories
userstories.splice(itemIndex, 0, itemScope.us)
item.remove()
item.off()
$scope.$apply()
resortAndSave()
onRemoveItem = (event) ->
item = angular.element(event.item)
itemScope = item.scope()
ids = _.map($scope.sprint.user_stories, "id")
index = ids.indexOf(itemScope.us.id)
if index != -1
userstories = $scope.sprint.user_stories
userstories.splice(index, 1)
item.off()
itemScope.$destroy()
dom = $el.find(".sprint-table")
sortable = new Sortable(dom[0], {
group: "backlog",
selector: ".milestone-us-item-row",
onUpdate: onUpdateItem,
onAdd: onAddItem,
onRemove: onRemoveItem,
})
return {link: link}
BacklogSummaryDirective = ->
link = ($scope, $el, $attrs) ->
return {link:link}
module = angular.module("taigaBacklog")
module.directive("tgBacklog", ["$tgRepo", BacklogDirective])
module.directive("tgBacklogSprint", ["$tgRepo", BacklogSprintDirective])
module.directive("tgBacklogSummary", BacklogSummaryDirective)
module.controller("BacklogController", [
"$scope",
"$rootScope",
"$tgRepo",
"$tgConfirm",
"$tgResources",
"$routeParams",
"$q",
BacklogController
])

View File

@ -0,0 +1,22 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base.coffee
###
module = angular.module("taigaBase", ["taigaLocales"])

View File

@ -0,0 +1,41 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/bindonce.coffee
###
bindOnce = @.taiga.bindOnce
# Html bind once directive
BindHtmlDirective = ->
link = (scope, element, attrs) ->
bindOnce scope, attrs.tgBoHtml, (val) ->
element.html(val)
return {link:link}
# Object reference bind once helper.
BindRefDirective = ->
link = (scope, element, attrs) ->
bindOnce scope, attrs.tgBoRef, (val) ->
element.html("##{val} ")
return {link:link}
module = angular.module("taigaBase")
module.directive("tgBoHtml", BindHtmlDirective)
module.directive("tgBoRef", BindRefDirective)

View File

@ -0,0 +1,57 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/confirm.coffee
###
taiga = @.taiga
class ConfirmService extends taiga.Service
@.$inject = ["$q"]
constructor: (@q) ->
@.el = angular.element(".lightbox_confirm-delete")
_.bindAll(@)
hide: ->
@.el.addClass("hidden")
@.el.off(".confirm-dialog")
ask: (title, subtitle) ->
# Render content
@.el.find("h2.title").html(title)
@.el.find("span.subtitle").html(subtitle)
defered = @q.defer()
# Assign event handlers
@.el.on "click.confirm-dialog", "a.button-green", (event) =>
event.preventDefault()
defered.resolve()
@.hide()
@.el.on "click.confirm-dialog", "a.button-red", (event) =>
event.preventDefault()
defered.reject()
@.hide()
@.el.removeClass("hidden")
return defered.promise
module = angular.module("taigaBase")
module.service("$tgConfirm", ["$q", ConfirmService])

View File

@ -0,0 +1,32 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/filters.coffee
###
taiga = @.taiga
class FiltersStorageService extends taiga.Service
@.$inject = ["$tgStorage", "$routeParams"]
constructor: (@storage, @params) ->
generateHash: (components=[]) ->
components = _.map(components, (x) -> JSON.stringify(x))
return hex_sha1(components.join(":"))

View File

@ -0,0 +1,74 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/http.coffee
###
taiga = @.taiga
class HttpService extends taiga.Service
@.$inject = ["$http", "$q", "$tgStorage"]
headers: ->
token = @storage.get('token')
if token
return {"Authorization":"Bearer #{token}"}
return {}
constructor: (@http, @q, @storage) ->
super()
request: (options) ->
options.headers = _.merge({}, options.headers or {}, @.headers())
if _.isPlainObject(options.data)
options.data = JSON.stringify(options.data)
return @http(options)
get: (url, params) ->
options = {method: "GET", url: url}
options.params = params if params
return @.request(options)
post: (url, data, params) ->
options = {method: "POST", url: url}
options.data = data if data
options.params = params if params
return @.request(options)
put: (url, data, params) ->
options = {method: "PUT", url: url}
options.data = data if data
options.params = params if params
return @.request(options)
patch: (url, data, params) ->
options = {method: "PATCH", url: url}
options.data = data if data
options.params = params if params
return @.request(options)
delete: (url, data, params) ->
options = {method: "DELETE", url: url}
options.data = data if data
options.params = params if params
return @.request(options)
module = angular.module("taigaBase")
module.service("$tgHttp", HttpService)

View File

@ -0,0 +1,76 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/i18n.coffee
###
taiga = @.taiga
bindOnce = @.taiga.bindOnce
defaults = {
ns: "app"
fallbackLng: "en"
async: false
}
class I18nService extends taiga.Service
constructor: (@rootscope, @localeEn) ->
setLanguage: (language) ->
options = _.clone(defaults, true)
i18n.setLng(language, options)
@rootscope.currentLang = language
@rootscope.$broadcast("i18n:changeLang", language)
initialize: (defaultLang="en") ->
options = _.clone(defaults, true)
options.lng = defaultLang
options.resStore = {
en: { app: @localeEn }
}
i18n.init(options)
@rootscope.t = i18n.t
I18nDirective = ($rootscope, $i18n) ->
link = ($scope, $el, $attrs) ->
values = $attrs.tgI18n.split(",")
options = $attrs.tgI18nOptions or '{}'
applyTranslation = ->
opts = $scope.$eval(options)
for v in values
if v.indexOf(":") == -1
$el.html($scope.t(v, opts))
else
[ns, v] = v.split(":")
$el.attr(ns, $scope.t(v, opts))
bindOnce($scope, "t", applyTranslation)
$scope.$on("i18n:changeLang", applyTranslation)
return {link: link}
module = angular.module("taigaBase")
module.service("$tgI18n", ["$rootScope", "localesEnglish", I18nService])
module.directive("tgI18n", ["$rootScope", "$tgI18n", I18nDirective])

View File

@ -0,0 +1,147 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/model.coffee
###
class Model
constructor: (name, data, dataTypes) ->
@._attrs = data
@._name = name
@._dataTypes = dataTypes
@.setAttrs(data)
@.initialize()
applyCasts: ->
for attrName, castName of @._dataTypes
castMethod = service.casts[castName]
if not castMethod
continue
@._attrs[attrName] = castMethod(@._attrs[attrName])
getIdAttrName: ->
return "id"
getName: ->
return @._name
getAttrs: (patch=false) ->
if patch
return _.extend({}, @._modifiedAttrs)
return _.extend({}, @._attrs, @._modifiedAttrs)
setAttrs: (attrs) ->
@._attrs = attrs
@._modifiedAttrs = {}
@.applyCasts()
@._isModified = false
setAttr: (name, value) ->
@._modifiedAttrs[name] = value
@._isModified = true
initialize: () ->
self = @
getter = (name) ->
return ->
if typeof(name) == 'string' and name.substr(0,2) == "__"
return self[name]
if name not in _.keys(self._modifiedAttrs)
return self._attrs[name]
return self._modifiedAttrs[name]
setter = (name) ->
return (value) ->
if typeof(name) == 'string' and name.substr(0,2) == "__"
self[name] = value
return
if self._attrs[name] != value
self._modifiedAttrs[name] = value
self._isModified = true
else
delete self._modifiedAttrs[name]
return
_.each @_attrs, (value, name) ->
options =
get: getter(name)
set: setter(name)
enumerable: true
configurable: true
Object.defineProperty(self, name, options)
serialize: () ->
data =
"data": _.clone(@_attrs)
"name": @_name
return JSON.stringify(data)
isModified: ->
return this._isModified
markSaved: () ->
@._isModified = false
@._attrs = @.getAttrs()
@._modifiedAttrs = {}
revert: () ->
@_modifiedAttrs = {}
@_isModified = false
@desSerialize = (sdata) ->
ddata = JSON.parse(sdata)
model = new Model(ddata.url, ddata.data)
return model
taiga = @.taiga
class ModelService extends taiga.Service
@.$inject = ["$q", "$tgUrls", "$tgStorage", "$tgHttp"]
constructor: (@q, @urls, @storage, @http) ->
super()
provider = ($q, $http, $gmUrls, $gmStorage) ->
service = {}
service.make_model = (name, data, cls=Model, dataTypes={}) ->
return new cls(name, data, dataTypes)
service.cls = Model
service.casts = {
int: (value) ->
return parseInt(value, 10)
float: (value) ->
return parseFloat(value, 10)
}
return service
module = angular.module("taigaBase")
module.factory("$tgModel", ["$q", "$http", "$tgUrls", "$tgStorage", provider])

View File

@ -0,0 +1,78 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/navurl.coffee
###
taiga = @.taiga
trim = @.taiga.trim
parseNav = (data, scope) ->
options = {}
[name, params] = _.map(data.split(":"), trim)
params = _.map(params.split(","), trim)
for item in params
[key, value] = _.map(item.split("="), trim)
options[key] = scope.$eval(value)
return [name, options]
formatUrl = (url, ctx={}) ->
replacer = (match) ->
match = trim(match, ":")
return ctx[match] or "undefined"
return url.replace(/(:\w+)/g, replacer)
class NavigationUrlsService extends taiga.Service
constructor: ->
@.urls = {}
update: (urls) ->
@.urls = _.merge({}, @.urls, urls or {})
resolve: (name) ->
return @.urls[name]
NavigationUrlsDirective = ($navurls, $auth) ->
# Example:
# link(tg-nav="project-backlog:project='sss',")
link = ($scope, $el, $attrs) ->
[name, options] = parseNav($attrs.tgNav, $scope)
user = $auth.getUser()
options.user = user.username if user
url = $navurls.resolve(name)
fullUrl = formatUrl(url, options)
$el.attr("href", fullUrl)
return {link: link}
module = angular.module("taigaBase")
module.service("$tgNavUrls", NavigationUrlsService)
module.directive("tgNav", ["$tgNavUrls", "$tgAuth", NavigationUrlsDirective])

View File

@ -0,0 +1,150 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/repository.coffee
###
taiga = @.taiga
class RepositoryService extends taiga.Service
@.$inject = ["$q", "$tgModel", "$tgStorage", "$tgHttp", "$tgUrls"]
constructor: (@q, @model, @storage, @http, @urls) ->
super()
resolveUrlForModel: (model) ->
idAttrName = model.getIdAttrName()
return "#{@urls.resolve(model.getName())}/#{model[idAttrName]}"
create: (name, data, dataTypes={}, extraParams={}) ->
defered = @q.defer()
url = @urls.resolve(name)
promise = @http.post(url, JSON.stringify(data))
promise.success (_data, _status) =>
defered.resolve(@model.make_model(name, _data, null, dataTypes))
promise.error (data, status) =>
defered.reject(data)
return defered.promise
remove: (model) ->
defered = @q.defer()
url = @.resolveUrlForModel(model)
promise = @http.delete(url)
promise.success (data, status) ->
defered.resolve(model)
promise.error (data, status) ->
defered.reject(model)
return defered.promise
saveAll: (models, patch=true) ->
promises = _.map(models, (x) => @.save(x, true))
return @q.all.apply(@q, promises)
save: (model, patch=true) ->
defered = @q.defer()
if not model.isModified() and patch
defered.resolve(model)
return defered.promise
url = @.resolveUrlForModel(model)
data = JSON.stringify(model.getAttrs(patch))
if patch
promise = @http.patch(url, data)
else
promise = @http.put(url, data)
promise.success (data, status) =>
model._isModified = false
model._attrs = _.extend(model.getAttrs(), data)
model._modifiedAttrs = {}
model.applyCasts()
defered.resolve(model)
promise.error (data, status) ->
defered.reject(data)
return defered.promise
refresh: (model) ->
defered = @q.defer()
url = @.resolveUrlForModel(model)
promise = @http.get(url)
promise.success (data, status) ->
model._modifiedAttrs = {}
model._attrs = data
model._isModified = false
model.applyCasts()
defered.resolve(model)
promise.error (data, status) ->
defered.reject(data)
return defered.promise
queryMany: (name, params) ->
url = @urls.resolve(name)
return @http.get(url, params).then (data) =>
return _.map(data.data, (x) => @model.make_model(name, x))
queryOne: (name, id, params) ->
url = @urls.resolve(name)
url = "#{url}/#{id}" if id
return @http.get(url, params).then (data) =>
return @model.make_model(name, data.data)
queryOneRaw: (name, id, params) ->
url = @urls.resolve(name)
url = "#{url}/#{id}" if id
return @http.get(url, params).then (data) =>
return data.data
queryPaginated: (name, params) ->
url = @urls.resolve(name)
return @http.get(url, params).then (data) =>
headers = data.headers()
result = {}
result.models = _.map(data.data, (x) => @model.make_model(name, x))
result.count = parseInt(headers["x-pagination-count"], 10)
result.current = parseInt(headers["x-pagination-current"] or 1, 10)
result.paginatedBy = parseInt(headers["x-paginated-by"], 10)
return result
resolve: (options) ->
params = {}
params.project = options.pslug if options.pslug?
params.us = options.usref if options.usref?
params.task = options.taskref if options.taskref?
params.issue = options.issueref if options.issueref?
params.milestone = options.mlref if options.mlref?
return @.queryOneRaw("resolver", null, params)
module = angular.module("taigaBase")
module.service("$tgRepo", RepositoryService)

View File

@ -0,0 +1,56 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/storage.coffee
###
taiga = @.taiga
class StorageService extends taiga.Service
@.$inject = ["$rootScope"]
constructor: ($rootScope) ->
super()
get: (key, _default) ->
serializedValue = localStorage.getItem(key)
if serializedValue == null
return _default or null
return JSON.parse(serializedValue)
set: (key, val) ->
if _.isObject(key)
_.each key, (val, key) =>
@set(key, val)
else
localStorage.setItem(key, JSON.stringify(val))
contains: (key) ->
value = @.get(key)
return (value != null)
remove: (key) ->
localStorage.removeItem(key)
clear: ->
localStorage.clear()
module = angular.module("taigaBase")
module.service("$tgStorage", StorageService)

View File

@ -0,0 +1,50 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/tags.coffee
###
taiga = @.taiga
# Directive that parses/format tags inputfield.
TagsDirective = ->
formatter = (v) ->
if _.isArray(v)
return v.join(", ")
return ""
parser = (v) ->
return [] if not v
result = _(v.split(",")).map((x) -> _.str.trim(x))
.map((x) -> x.replace(/\s+/, "-"))
return result.value()
link = ($scope, $el, $attrs, $ctrl) ->
$ctrl.$formatters.push(formatter)
$ctrl.$parsers.push(parser)
return {
require: "ngModel"
link: link
}
module = angular.module("taigaBase")
module.directive("tgTags", TagsDirective)

View File

@ -0,0 +1,51 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/base/http.coffee
###
format = (fmt, obj) ->
obj = _.clone(obj)
return fmt.replace /%s/g, (match) -> String(obj.shift())
taiga = @.taiga
class UrlsService extends taiga.Service
@.$inject = ["$tgConfig"]
constructor: (@config) ->
@.urls = {}
@.host = config.get("host")
@.scheme = config.get("scheme")
update: (urls) ->
@.urls = _.merge(@.urls, urls)
resolve: ->
args = _.toArray(arguments)
if args.length == 0
throw Error("wrong arguments to setUrls")
name = args.slice(0, 1)[0]
url = format(@.urls[name], args.slice(1))
return format("%s://%s%s", [@.scheme, @.host, url])
module = angular.module("taigaBase")
module.service('$tgUrls', UrlsService)

View File

@ -0,0 +1,45 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/controllerMixins.coffee
###
class PageMixin
loadUsersAndRoles: ->
promise = @q.all([
@rs.projects.usersList(@scope.projectId),
@rs.projects.rolesList(@scope.projectId)
])
return promise.then (results) =>
[users, roles] = results
@scope.users = _.sortBy(users, "id")
@scope.roles = roles
@scope.usersById = {}
_.each(users, (x) => @scope.usersById[x.id] = x)
availableRoles = _(@scope.project.memberships).map("role").uniq().value()
@scope.computableRoles = _(roles).filter("computable")
.filter((x) -> _.contains(availableRoles, x.id))
.value()
return results
taiga = @.taiga
taiga.PageMixin = PageMixin

View File

@ -0,0 +1,22 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/locales.coffee
###
module = angular.module("taigaLocales", [])

View File

View File

@ -0,0 +1,38 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/navigation.coffee
###
# Simple module that uses navurls service and register
# navigation urls for taiga.
urls = {
"home": "/",
"profile": "/:user",
"project": "/:user/:project",
"project-backlog": "/:user/:project/backlog",
"project-taskboard": "/:user/:project/taskboard/:sprint",
}
init = ($log, $navurls) ->
$log.debug "Initialize navigation urls"
$navurls.update(urls)
module = angular.module("taigaNavigation", ["taigaBase"])
module.run(["$log", "$tgNavUrls", init])

View File

@ -0,0 +1,115 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/resources.coffee
###
taiga = @.taiga
class ResourcesService extends taiga.Service
urls = {
"auth": "/api/v1/auth"
"auth-register": "/api/v1/auth/register"
"permissions": "/api/v1/permissions"
"roles": "/api/v1/roles"
"projects": "/api/v1/projects"
"memberships": "/api/v1/memberships"
"milestones": "/api/v1/milestones"
"userstories": "/api/v1/userstories"
"bulk-create-us": "/api/v1/userstories/bulk_create"
"bulk-update-us-order": "/api/v1/userstories/bulk_update_order"
"userstories-restore": "/api/v1/userstories/%s/restore"
"tasks": "/api/v1/tasks"
"bulk-create-tasks": "/api/v1/tasks/bulk_create"
"tasks-restore": "/api/v1/tasks/%s/restore"
"issues": "/api/v1/issues"
"issues-restore": "/api/v1/issues/%s/restore"
"wiki": "/api/v1/wiki"
"wiki-restore": "/api/v1/wiki/%s/restore"
"choices/userstory-statuses": "/api/v1/userstory-statuses"
"choices/userstory-statuses/bulk-update-order": "/api/v1/userstory-statuses/bulk_update_order"
"choices/points": "/api/v1/points"
"choices/points/bulk-update-order": "/api/v1/points/bulk_update_order"
"choices/task-statuses": "/api/v1/task-statuses"
"choices/task-statuses/bulk-update-order": "/api/v1/task-statuses/bulk_update_order"
"choices/issue-statuses": "/api/v1/issue-statuses"
"choices/issue-statuses/bulk-update-order": "/api/v1/issue-statuses/bulk_update_order"
"choices/issue-types": "/api/v1/issue-types"
"choices/issue-types/bulk-update-order": "/api/v1/issue-types/bulk_update_order"
"choices/priorities": "/api/v1/priorities"
"choices/priorities/bulk-update-order": "/api/v1/priorities/bulk_update_order"
"choices/severities": "/api/v1/severities"
"choices/severities/bulk-update-order": "/api/v1/severities/bulk_update_order"
"search": "/api/v1/search"
"sites": "/api/v1/sites"
"project-templates": "/api/v1/project-templates"
"site-members": "/api/v1/site-members"
"site-projects": "/api/v1/site-projects"
"users": "/api/v1/users"
"users-password-recovery": "/api/v1/users/password_recovery"
"users-change-password-from-recovery": "/api/v1/users/change_password_from_recovery"
"users-change-password": "/api/v1/users/change_password"
"resolver": "/api/v1/resolver"
"wiki-attachment": "/media/attachment-files/%s/wikipage/%s"
# History
"history/userstory": "/api/v1/history/userstory"
"history/issue": "/api/v1/history/issue"
"history/task": "/api/v1/history/task"
"history/wiki": "/api/v1/history/wiki"
# Attachments
"userstories/attachments": "/api/v1/userstories/attachments"
"issues/attachments": "/api/v1/issues/attachments"
"tasks/attachments": "/api/v1/tasks/attachments"
"wiki/attachments": "/api/v1/wiki/attachments"
}
# Initialize api urls service
initUrls = ($log, $urls) ->
$log.debug "Initialize api urls"
$urls.update(urls)
# Initialize resources service populating it with methods
# defined in separated files.
initResources = ($log, $rs) ->
$log.debug "Initialize resources"
providers = _.toArray(arguments).slice(2)
for provider in providers
provider($rs)
module = angular.module("taigaResources", ["taigaBase"])
module.service("$tgResources", ResourcesService)
# Module entry point
module.run(["$log", "$tgUrls", initUrls])
module.run([
"$log",
"$tgResources",
"$tgProjectsResourcesProvider",
"$tgSprintsResourcesProvider",
"$tgUserstoriesResourcesProvider",
initResources
])

View File

@ -0,0 +1,48 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/resources/projects.coffee
###
taiga = @.taiga
resourceProvider = ($repo) ->
service = {}
service.get = (id) ->
return $repo.queryOne("projects", id)
service.list = ->
return $repo.queryMany("projects")
service.usersList = (projectId) ->
params = {"project": projectId}
return $repo.queryMany("users", params)
service.rolesList = (projectId) ->
params = {"project": projectId}
return $repo.queryMany("roles", params)
return (instance) ->
instance.projects = service
module = angular.module("taigaResources")
module.factory("$tgProjectsResourcesProvider", ["$tgRepo", resourceProvider])

View File

@ -0,0 +1,40 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/resources/sprints.coffee
###
taiga = @.taiga
resourceProvider = ($repo, $model) ->
service = {}
service.list = (projectId) ->
params = {"project": projectId}
return $repo.queryMany("milestones", params).then (milestones) =>
for m in milestones
uses = m.user_stories
uses = _.map(uses, (u) => $model.make_model("userstories", u))
m._attrs.user_stories = uses
return milestones
return (instance) ->
instance.sprints = service
module = angular.module("taigaResources")
module.factory("$tgSprintsResourcesProvider", ["$tgRepo", "$tgModel", resourceProvider])

View File

@ -0,0 +1,40 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/resources/userstories.coffee
###
taiga = @.taiga
resourceProvider = ($repo, $http, $urls) ->
service = {}
service.listUnassigned = (projectId) ->
params = {"project": projectId, "milestone": "null"}
return $repo.queryMany("userstories", params)
service.bulkCreate = (projectId, data) ->
url = $urls.resolve("bulk-create-us")
params = {projectId: projectId, bulkStories: data}
return $http.post(url, params)
return (instance) ->
instance.userstories = service
module = angular.module("taigaResources")
module.factory("$tgUserstoriesResourcesProvider", ["$tgRepo", "$tgHttp", "$tgUrls", resourceProvider])

50
app/coffee/utils.coffee Normal file
View File

@ -0,0 +1,50 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: utils.coffee
###
bindOnce = (scope, attr, continuation) =>
val = scope.$eval(attr)
if val != undefined
return continuation(val)
delBind = null
delBind = scope.$watch attr, (val) ->
return if val is undefined
continuation(val)
delBind() if delBind
mixOf = (base, mixins...) ->
class Mixed extends base
for mixin in mixins by -1 #earlier mixins override later ones
for name, method of mixin::
Mixed::[name] = method
Mixed
trim = (data, char) ->
return _.str.trim(data, char)
taiga = @.taiga
taiga.bindOnce = bindOnce
taiga.mixOf = mixOf
taiga.trim = trim

Binary file not shown.

View File

@ -33,4 +33,5 @@
<glyph unicode="&#120;" d="M295 410c0-23-19-42-42-42-24 0-43 19-43 42 0 23 19 42 43 42 23 0 42-19 42-42z m38-54l0 0-152 0 0 0c-11 0-20-9-20-20l0 0 0-120 0 0c0-4 2-9 6-12 7-7 18-7 25 0 3 3 5 8 5 12l0 0 0 84 0 0c0 3 3 6 6 6 3 0 5-3 5-6l0 0 0-219c0-12 10-21 21-21 12 0 21 9 21 21l0 110 0 0c0 3 3 6 6 6 3 0 6-3 6-6l0 0 0-110c0-12 9-21 21-21 11 0 21 9 21 21l0 219c0 3 2 6 5 6 3 0 6-3 6-6l0-84 0 0c0-4 2-9 5-12 7-7 19-7 26 0 3 3 5 8 5 12l0 0 0 120c0 11-8 19-18 20z"/> <glyph unicode="&#120;" d="M295 410c0-23-19-42-42-42-24 0-43 19-43 42 0 23 19 42 43 42 23 0 42-19 42-42z m38-54l0 0-152 0 0 0c-11 0-20-9-20-20l0 0 0-120 0 0c0-4 2-9 6-12 7-7 18-7 25 0 3 3 5 8 5 12l0 0 0 84 0 0c0 3 3 6 6 6 3 0 5-3 5-6l0 0 0-219c0-12 10-21 21-21 12 0 21 9 21 21l0 110 0 0c0 3 3 6 6 6 3 0 6-3 6-6l0 0 0-110c0-12 9-21 21-21 11 0 21 9 21 21l0 219c0 3 2 6 5 6 3 0 6-3 6-6l0-84 0 0c0-4 2-9 5-12 7-7 19-7 26 0 3 3 5 8 5 12l0 0 0 120c0 11-8 19-18 20z"/>
<glyph unicode="&#121;" d="M432 309l-123 0 0 123c0 5-5 10-10 10l-86 0c-5 0-10-5-10-10l0-123-123 0c-5 0-10-5-10-10l0-86c0-3 1-5 3-7 2-2 4-3 7-3l123 0 0-123c0-3 1-5 3-7 2-2 4-3 7-3l86 0c3 0 5 1 7 3 2 2 3 4 3 7l0 123 123 0c3 0 5 1 7 3 2 2 3 4 3 7l0 86c0 5-5 10-10 10z"/> <glyph unicode="&#121;" d="M432 309l-123 0 0 123c0 5-5 10-10 10l-86 0c-5 0-10-5-10-10l0-123-123 0c-5 0-10-5-10-10l0-86c0-3 1-5 3-7 2-2 4-3 7-3l123 0 0-123c0-3 1-5 3-7 2-2 4-3 7-3l86 0c3 0 5 1 7 3 2 2 3 4 3 7l0 123 123 0c3 0 5 1 7 3 2 2 3 4 3 7l0 86c0 5-5 10-10 10z"/>
<glyph unicode="&#65;" d="M208 1c-47 0-91 19-124 52-34 33-52 77-52 124 0 47 18 91 52 125l178 174c48 48 132 48 180 0 50-50 50-131 0-181l-160-157c-31-30-81-31-113 1-31 31-31 82 0 113l62 62 46-45-62-62c-4-5-5-9-5-12 0-2 1-7 5-11 8-8 14-8 22 0l160 156c25 25 25 66 0 91-24 24-66 24-90 0l-178-175c-21-21-33-49-33-79 0-30 12-58 33-79 42-42 116-42 158 0l80 80 45-45-80-80c-33-33-77-52-124-52z"/> <glyph unicode="&#65;" d="M208 1c-47 0-91 19-124 52-34 33-52 77-52 124 0 47 18 91 52 125l178 174c48 48 132 48 180 0 50-50 50-131 0-181l-160-157c-31-30-81-31-113 1-31 31-31 82 0 113l62 62 46-45-62-62c-4-5-5-9-5-12 0-2 1-7 5-11 8-8 14-8 22 0l160 156c25 25 25 66 0 91-24 24-66 24-90 0l-178-175c-21-21-33-49-33-79 0-30 12-58 33-79 42-42 116-42 158 0l80 80 45-45-80-80c-33-33-77-52-124-52z"/>
<glyph unicode="&#122;" d="M468 210c0-1 0-1 0-2-12-51-38-92-77-124-38-32-84-47-136-47-28 0-55 5-81 15-26 11-49 26-69 45l-37-37c-4-3-8-5-13-5-5 0-9 2-13 5-4 4-5 8-5 13l0 128c0 5 1 9 5 13 4 4 8 5 13 5l128 0c5 0 9-1 13-5 3-4 5-8 5-13 0-5-2-9-5-13l-39-39c13-12 28-22 46-29 17-7 35-10 53-10 26 0 49 6 71 18 23 13 40 30 54 51 2 4 7 15 15 34 1 4 4 6 8 6l55 0c3 0 5 0 7-2 1-2 2-4 2-7z m7 229l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-5 0-9 1-13 5-3 4-5 8-5 13 0 5 2 9 5 13l40 39c-28 26-62 39-100 39-26 0-49-6-71-18-23-13-40-30-54-51-2-4-7-15-15-34-1-4-4-6-8-6l-57 0c-3 0-5 0-7 2-1 2-2 4-2 7l0 2c12 51 38 92 77 124 39 32 85 47 137 47 28 0 55-5 81-15 26-11 50-26 70-45l37 37c4 3 8 5 13 5 5 0 9-2 13-5 4-4 5-8 5-13z"/>
</font></defs></svg> </font></defs></svg>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

17
app/index.jade Normal file
View File

@ -0,0 +1,17 @@
doctype html
html(lang="en", ng-app="taiga")
head
meta(charset="utf-8")
title= Taiga
meta(http-equiv="content-type", content="text/html; charset=utf-8")
meta(name="description", content="Taiga Landing page")
meta(name="keywords", content="Agile, Taiga, Management, Github")
meta(name="viewport", content="width=device-width, user-scalable=no")
link(rel="stylesheet", href="/styles/main.css")
body
include partials/views/modules/nav
div.master(ng-view="")
div.hidden.lightbox.lightbox_confirm-delete
include partials/views/modules/lightbox_confirm-delete
script(src="/js/libs.js?v=#{v}")
script(src="/js/app.js?v=#{v}")

538
app/js/Sortable.js Normal file
View File

@ -0,0 +1,538 @@
/**!
* Sortable
* @author RubaXa <trash@rubaxa.org>
* @license MIT
*/
(function (factory){
"use strict";
if( typeof define === "function" && define.amd ){
define(factory);
}
else if( typeof module != "undefined" && typeof module.exports != "undefined" ){
module.exports = factory();
}
else {
window["Sortable"] = factory();
}
})(function (){
"use strict";
var
dragEl
, ghostEl
, rootEl
, nextEl
, lastEl
, lastCSS
, lastRect
, activeGroup
, tapEvt
, touchEvt
, expando = 'Sortable' + (new Date).getTime()
, win = window
, document = win.document
, parseInt = win.parseInt
, _silent = false
, _createEvent = function (event/**String*/, item/**HTMLElement*/){
var evt = document.createEvent('Event');
evt.initEvent(event, true, true);
evt.item = item;
return evt;
}
, noop = function (){}
, slice = [].slice
, touchDragOverListeners = []
;
/**
* @class Sortable
* @param {HTMLElement} el
* @param {Object} [options]
* @constructor
*/
function Sortable(el, options){
this.el = el; // root element
this.options = options = (options || {});
// Defaults
options.group = options.group || Math.random();
options.handle = options.handle || null;
options.draggable = options.draggable || el.children[0] && el.children[0].nodeName || (/[uo]l/i.test(el.nodeName) ? 'li' : '*');
options.ghostClass = options.ghostClass || 'sortable-ghost';
options.onAdd = _bind(this, options.onAdd || noop);
options.onUpdate = _bind(this, options.onUpdate || noop);
options.onRemove = _bind(this, options.onRemove || noop);
// Export group name
el[expando] = options.group;
// Bind all private methods
for( var fn in this ){
if( fn.charAt(0) === '_' ){
this[fn] = _bind(this, this[fn]);
}
}
// Bind events
_on(el, 'add', options.onAdd);
_on(el, 'update', options.onUpdate);
_on(el, 'remove', options.onRemove);
_on(el, 'mousedown', this._onTapStart);
_on(el, 'touchstart', this._onTapStart);
_on(el, 'selectstart', this._onTapStart);
_on(el, 'dragover', this._onDragOver);
_on(el, 'dragenter', this._onDragOver);
touchDragOverListeners.push(this._onDragOver);
}
Sortable.prototype = {
constructor: Sortable,
_applyEffects: function (){
_toggleClass(dragEl, this.options.ghostClass, true);
},
_onTapStart: function (evt/**Event|TouchEvent*/){
var
touch = evt.touches && evt.touches[0]
, target = (touch || evt).target
, options = this.options
, el = this.el
;
if( options.handle ){
target = _closest(target, options.handle, el);
}
target = _closest(target, options.draggable, el);
// IE 9 Support
// if( target && evt.type == 'selectstart' ){
// if( target.tagName != 'A' && target.tagName != 'IMG'){
// target.dragDrop();
// }
// }
if( target && !dragEl && (target.parentNode === el) ){
tapEvt = evt;
target.draggable = true;
// Disable "draggable"
_find(target, 'a', _disableDraggable);
_find(target, 'img', _disableDraggable);
if( touch ){
// Touch device support
tapEvt = {
target: target
, clientX: touch.clientX
, clientY: touch.clientY
};
this._onDragStart(tapEvt, true);
evt.preventDefault();
}
_on(this.el, 'dragstart', this._onDragStart);
_on(this.el, 'dragend', this._onDrop);
_on(document, 'dragover', _globalDragOver);
try {
if( document.selection ){
document.selection.empty();
} else {
window.getSelection().removeAllRanges()
}
} catch (err){ }
}
},
_emulateDragOver: function (){
if( touchEvt ){
_css(ghostEl, 'display', 'none');
var
target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY)
, parent = target
, group = this.options.group
, i = touchDragOverListeners.length
;
do {
if( parent[expando] === group ){
while( i-- ){
touchDragOverListeners[i]({
clientX: touchEvt.clientX,
clientY: touchEvt.clientY,
target: target,
rootEl: parent
});
}
break;
}
target = parent; // store last element
}
while( parent = parent.parentNode );
_css(ghostEl, 'display', '');
}
},
_onTouchMove: function (evt/**TouchEvent*/){
if( tapEvt ){
var
touch = evt.touches[0]
, dx = touch.clientX - tapEvt.clientX
, dy = touch.clientY - tapEvt.clientY
;
touchEvt = touch;
_css(ghostEl, 'webkitTransform', 'translate3d('+dx+'px,'+dy+'px,0)');
}
},
_onDragStart: function (evt/**Event*/, isTouch/**Boolean*/){
var
target = evt.target
, dataTransfer = evt.dataTransfer
;
rootEl = this.el;
dragEl = target;
nextEl = target.nextSibling;
activeGroup = this.options.group;
if( isTouch ){
var
rect = target.getBoundingClientRect()
, css = _css(target)
, ghostRect
;
ghostEl = target.cloneNode(true);
_css(ghostEl, 'top', rect.top - parseInt(css.marginTop, 10));
_css(ghostEl, 'left', rect.left - parseInt(css.marginLeft, 10));
_css(ghostEl, 'width', rect.width);
_css(ghostEl, 'height', rect.height);
_css(ghostEl, 'opacity', '0.8');
_css(ghostEl, 'position', 'fixed');
_css(ghostEl, 'zIndex', '100000');
rootEl.appendChild(ghostEl);
// Fixing dimensions.
ghostRect = ghostEl.getBoundingClientRect();
_css(ghostEl, 'width', rect.width*2 - ghostRect.width);
_css(ghostEl, 'height', rect.height*2 - ghostRect.height);
// Bind touch events
_on(document, 'touchmove', this._onTouchMove);
_on(document, 'touchend', this._onDrop);
this._loopId = setInterval(this._emulateDragOver, 150);
}
else {
dataTransfer.effectAllowed = 'move';
dataTransfer.setData('Text', target.textContent);
_on(document, 'drop', this._onDrop);
}
setTimeout(this._applyEffects);
},
_onDragOver: function (evt/**Event*/){
if( !_silent && (activeGroup === this.options.group) && (evt.rootEl === void 0 || evt.rootEl === this.el) ){
var
el = this.el
, target = _closest(evt.target, this.options.draggable, el)
;
if( el.children.length === 0 || el.children[0] === ghostEl || (el === evt.target) && _ghostInBottom(el, evt) ){
el.appendChild(dragEl);
}
else if( target && target !== dragEl && (target.parentNode[expando] !== void 0) ){
if( lastEl !== target ){
lastEl = target;
lastCSS = _css(target);
lastRect = target.getBoundingClientRect();
}
var
rect = lastRect
, width = rect.right - rect.left
, height = rect.bottom - rect.top
, floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display)
, skew = (floating ? (evt.clientX - rect.left)/width : (evt.clientY - rect.top)/height) > .5
, isWide = (target.offsetWidth > dragEl.offsetWidth)
, isLong = (target.offsetHeight > dragEl.offsetHeight)
, nextSibling = target.nextSibling
, after
;
_silent = true;
setTimeout(_unsilent, 30);
if( floating ){
after = (target.previousElementSibling === dragEl) && !isWide || (skew > .5) && isWide
} else {
after = (target.nextElementSibling !== dragEl) && !isLong || (skew > .5) && isLong;
}
if( after && !nextSibling ){
el.appendChild(dragEl);
} else {
target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
}
}
}
},
_onDrop: function (evt/**Event*/){
clearInterval(this._loopId);
// Unbind events
_off(document, 'drop', this._onDrop);
_off(document, 'dragover', _globalDragOver);
_off(this.el, 'dragend', this._onDrop);
_off(this.el, 'dragstart', this._onDragStart);
_off(this.el, 'selectstart', this._onTapStart);
_off(document, 'touchmove', this._onTouchMove);
_off(document, 'touchend', this._onDrop);
if( evt ){
evt.preventDefault();
evt.stopPropagation();
if( ghostEl ){
ghostEl.parentNode.removeChild(ghostEl);
}
if( dragEl ){
_toggleClass(dragEl, this.options.ghostClass, false);
if( !rootEl.contains(dragEl) ){
// Remove event
rootEl.dispatchEvent(_createEvent('remove', dragEl));
// Add event
dragEl.dispatchEvent(_createEvent('add', dragEl));
}
else if( dragEl.nextSibling !== nextEl ){
// Update event
dragEl.dispatchEvent(_createEvent('update', dragEl));
}
}
// Set NULL
rootEl =
dragEl =
ghostEl =
nextEl =
tapEvt =
touchEvt =
lastEl =
lastCSS =
activeGroup = null;
}
},
destroy: function (){
var el = this.el, options = this.options;
_off(el, 'add', options.onAdd);
_off(el, 'update', options.onUpdate);
_off(el, 'remove', options.onRemove);
_off(el, 'mousedown', this._onTapStart);
_off(el, 'touchstart', this._onTapStart);
_off(el, 'selectstart', this._onTapStart);
_off(el, 'dragover', this._onDragOver);
_off(el, 'dragenter', this._onDragOver);
//remove draggable attributes
Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function(el) {
el.removeAttribute('draggable');
});
touchDragOverListeners.splice(touchDragOverListeners.indexOf(this._onDragOver), 1);
this._onDrop();
this.el = null;
}
};
function _bind(ctx, fn){
var args = slice.call(arguments, 2);
return fn.bind ? fn.bind.apply(fn, [ctx].concat(args)) : function (){
return fn.apply(ctx, args.concat(slice.call(arguments)));
};
}
function _closest(el, selector, ctx){
if( selector === '*' ){
return el;
}
else if( el ){
ctx = ctx || document;
selector = selector.split('.');
var
tag = selector.shift().toUpperCase()
, re = new RegExp('\\s('+selector.join('|')+')\\s', 'g')
;
do {
if(
(tag === '' || el.nodeName == tag)
&& (!selector.length || ((' '+el.className+' ').match(re) || []).length == selector.length)
){
return el;
}
}
while( el !== ctx && (el = el.parentNode) );
}
return null;
}
function _globalDragOver(evt){
evt.dataTransfer.dropEffect = 'move';
evt.preventDefault();
}
function _on(el, event, fn){
el.addEventListener(event, fn, false);
}
function _off(el, event, fn){
el.removeEventListener(event, fn, false);
}
function _toggleClass(el, name, state){
if( el ){
if( el.classList ){
el.classList[state ? 'add' : 'remove'](name);
}
else {
var className = (' '+el.className+' ').replace(/\s+/g, ' ').replace(' '+name+' ', '');
el.className = className + (state ? ' '+name : '')
}
}
}
function _css(el, prop, val){
if( el && el.style ){
if( val === void 0 ){
if( document.defaultView && document.defaultView.getComputedStyle ){
val = document.defaultView.getComputedStyle(el, '');
}
else if( el.currentStyle ){
val = el.currentStyle;
}
return prop === void 0 ? val : val[prop];
} else {
el.style[prop] = val + (typeof val === 'string' ? '' : 'px');
}
}
}
function _find(ctx, tagName, iterator){
if( ctx ){
var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length;
if( iterator ){
for( ; i < n; i++ ){
iterator(list[i], i);
}
}
return list;
}
return [];
}
function _disableDraggable(el){
return el.draggable = false;
}
function _unsilent(){
_silent = false;
}
function _ghostInBottom(el, evt){
var last = el.lastElementChild.getBoundingClientRect();
return evt.clientY - (last.top + last.height) > 5; // min delta
}
// Export utils
Sortable.utils = {
on: _on,
off: _off,
css: _css,
find: _find,
bind: _bind,
closest: _closest,
toggleClass: _toggleClass
};
Sortable.version = '0.1.8';
// Export
return Sortable;
});

45
app/locales/en/app.json Normal file
View File

@ -0,0 +1,45 @@
{
"checksley": {
"defaultMessage": "This value seems to be invalid.",
"type-email": "This value should be a valid email.",
"type-url": "This value should be a valid url.",
"type-urlstrict": "This value should be a valid url.",
"type-number": "This value should be a valid number.",
"type-digits": "This value should be digits.",
"type-dateIso": "This value should be a valid date (YYYY-MM-DD).",
"type-alphanum": "This value should be alphanumeric.",
"type-phone": "This value should be a valid phone number.",
"notnull": "This value should not be null.",
"notblank": "This value should not be blank.",
"required": "This value is required.",
"regexp": "This value seems to be invalid.",
"min": "This value should be greater than or equal to %s.",
"max": "This value should be lower than or equal to %s.",
"range": "This value should be between %s and %s.",
"minlength": "This value is too short. It should have %s characters or more.",
"maxlength": "This value is too long. It should have %s characters or less.",
"rangelength": "This value length is invalid. It should be between %s and %s characters long.",
"mincheck": "You must select at least %s choices.",
"maxcheck": "You must select %s choices or less.",
"rangecheck": "You must select between %s and %s choices.",
"equalto": "This value should be the same."
},
"pagination": {
"next": "Next",
"prev": "Previous"
},
"common": {
"subject": "Subject"
"save": "Save",
"blocked": "Blocked",
"cancel": "Cancel",
"status": "Status",
"new-bulk": "New bulk insert",
"one-item-line": "One item per line..."
},
"us": {
"title-new": "New User Story",
"team-requirement": "Ream Requirement",
"client-requirement": "Client Requirement"
}
}

View File

@ -0,0 +1,48 @@
extends layout
block head
title Taiga Project management web application with scrum in mind!
block content
div.wrapper
sidebar.menu-secondary.sidebar
include views/modules/admin-menu
sidebar.menu-tertiary.sidebar
include views/modules/admin-submenu
section.main.admin-roles
header
include views/components/mainTitle
p.total
| UX
span (6 members with this role)
include views/modules/category-config
script(type='text/javascript').
function randomIntFromInterval(min,max) {
return Math.floor(Math.random()*(max-min+1)+min);
}
(function() {
if(randomIntFromInterval(0, 4) !== 4) return true;
var inputs = document.querySelectorAll('input');
function change(input) {
var num = randomIntFromInterval(100, 600);
setTimeout(function() {
if(input.hasAttribute('checked')) {
input.removeAttribute('checked');
} else {
input.setAttribute('checked', 'checked');
}
}, num);
}
setInterval(function() {
for(var i = 0; i < inputs.length; i++) {
change(inputs[i]);
}
}, 500);
})()

View File

@ -1,33 +1,33 @@
extends layout extends dummy-layout
block head block head
title Taiga Project management web application with scrum in mind! title Taiga Project management web application with scrum in mind!
block content block content
sidebar.menu-secondary.extrabar.filters-bar div.wrapper(tg-backlog, ng-controller="BacklogController as ctrl")
include views/modules/filters sidebar.menu-secondary.extrabar.filters-bar
section.main.backlog include views/modules/filters
include views/components/mainTitle section.main.backlog
include views/components/summary include views/components/mainTitle
include views/modules/burndown include views/components/summary
div.backlog-menu include views/modules/burndown
a.trans-button(href="", title="Move to Current Sprint") div.backlog-menu
span.icon.icon-move a.trans-button(href="", title="Move to Current Sprint")
span.text Move to current Sprint span.icon.icon-move
a.trans-button(href="", title="Show Filters") span.text Move to current Sprint
span.icon.icon-filter a.trans-button(href="", title="Show Filters", id="show-filters-button")
span.text Show Filters span.icon.icon-filter
a.trans-button(href="", title="Show Tags") span.text Show Filters
span.icon.icon-tag a.trans-button(href="", title="Show Tags")
span.text Show Tags span.icon.icon-tag
span.text Show Tags
include views/components/addnewus include views/components/addnewus
include views/modules/backlog-table include views/modules/backlog-table
sidebar.menu-secondary.sidebar sidebar.menu-secondary.sidebar
include views/modules/sprints include views/modules/sprints
div.lightbox.lightbox_add-new-us div.lightbox.lightbox_add-new-us.hidden(tg-lb-create-edit-userstory)
include views/modules/lightbox_add-new-us include views/modules/lightbox_add-new-us
div.lightbox.lightbox_add-bulk div.lightbox.lightbox_add-bulk.hidden(tg-lb-create-bulk-userstories)
include views/modules/lightbox_add-bulk include views/modules/lightbox_add-bulk
div.lightbox.lightbox_add-sprint div.lightbox.lightbox_add-sprint.hidden
include views/modules/lightbox_add-sprint include views/modules/lightbox_add-sprint

View File

@ -0,0 +1 @@
block content

View File

@ -0,0 +1,63 @@
extends layout
block head
title Taiga Project management web application with scrum in mind!
block content
div.wrapper
sidebar.menu-secondary.sidebar
include views/modules/admin-menu
sidebar.menu-tertiary.sidebar
include views/modules/admin-submenu
section.main.admin-functionalities
header
include views/components/mainTitle
section
div.functionality
div.icon.icon-backlog
div.desc
p
span Backlog
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
div.functionality.active
div.icon.icon-kanban
div.desc
p
span Kanban
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
div.functionality
div.icon.icon-issues
div.desc
p
span Issues
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
div.functionality.active
div.icon.icon-wiki
div.desc
p
span Wiki
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
div.functionality.active
div.icon.icon-video
div.desc
p
span Video
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
select
option Option 1
option Option 2
option Option 3
option Option 4
select
option Option 1
option Option 2
option Option 3
option Option 4

View File

@ -10,5 +10,5 @@ html(lang="en")
block head block head
body body
include views/modules/nav include views/modules/nav
div.wrapper div.master
block content block content

View File

@ -0,0 +1,58 @@
extends layout
block head
title Taiga Project management web application with scrum in mind!
block content
sidebar.menu-secondary.sidebar
include views/modules/admin-menu
section.main.admin-membership
header
include views/components/mainTitle
a.button-green(title="Add New US" href="")
span.text + New role
section.admin-membership-table
div.row.title
div.header-member Member
div.header-role Role
div.header-status Status
div.row
div.row-member
figure.avatar
img(alt="username" src="http://thecodeplayer.com/u/uifaces/12.jpg")
figcaption
span.name Pilar
span.email pilar.estaban@secuoyas.com
div.row-role
select
option UX
option Front
option Back
div.row-status
div.active Active
a(href="#").delete
span.icon.icon-delete
div.row
div.row-member
figure.avatar
img(alt="username" src="http://thecodeplayer.com/u/uifaces/12.jpg")
figcaption
span.name Pilar
span.email pilar.estaban@secuoyas.com
div.row-role
select
option UX
option Front
option Back
div.row-status
a(href="#").pending
| Pending
span.icon.icon-reload
a(href="#").delete
span.icon.icon-delete
div.lightbox.ligbox_add-member
include views/modules/lightbox_add-member

View File

@ -0,0 +1,34 @@
extends layout
block head
title Taiga Project management web application with scrum in mind!
block content
div.wrapper
sidebar.menu-secondary.sidebar
include views/modules/admin-menu
sidebar.menu-tertiary.sidebar
include views/modules/admin-submenu
section.main.project-details
header
include views/components/mainTitle
form
fieldset
input(type="text", placeholder="Name")
fieldset
input(type="text", placeholder="Slug")
fieldset
input(type="text", placeholder="Number of sprints")
fieldset
input(type="text", placeholder="Number of US points")
fieldset
textarea(placeholder="Description")
a.button.button-green(href="")
span Create

View File

@ -0,0 +1,13 @@
extends layout
block head
title Taiga Project management web application with scrum in mind!
block content
sidebar.menu-secondary.sidebar
include views/modules/search-in
section.main.search-result
include views/components/mainTitle
include views/modules/search-filter
include views/modules/search-result-issues-table

View File

@ -1,5 +1,5 @@
div.new-us div.new-us
a.button-green(href="", title="Add New US") a.button-green(href="", ng-click="ctrl.addNewUs('standard')", title="Add New US")
span.text + Add new US span.text + Add new US
a.button-bulk(href="", title="Bulk") a.button-bulk(href="", ng-click="ctrl.addNewUs('bulk')", title="Bulk")
span.icon.icon-bulk span.icon.icon-bulk

View File

@ -0,0 +1,15 @@
div.row.us-item-row(ng-repeat="us in visibleUserstories track by us.id")
div.user-stories
div.user-story-name
input(type="checkbox", name="")
a(href="") {{ us.subject }}
span.us-settings
a.icon.icon-edit(href="", ng-click="ctrl.editUserStory(us)", title="Edit")
a.icon.icon-delete(href="", ng-click="ctrl.deleteUserStory(us)", title="Delete")
div.user-story-tags
span.tag Tag name
span.tag Tag name
div.status Status
div.points 12
div.points 54
a.icon.icon-drag-v(href="", title="Drag")

View File

@ -1,3 +1,5 @@
// Depreacted, should be removed when any
// other static template not need it.
a.single-filter(href="", title="filter") a.single-filter(href="", title="filter")
span.name filter span.name filter
span.number 23 span.number 23

View File

@ -1,3 +1,3 @@
h1 h1
span ProjectName span(tg-bo-html="project.name")
span.green Title span.green Title

View File

@ -1,19 +1,19 @@
div.summary div.summary(tg-backlog-summary)
div.summary-progress-bar div.summary-progress-bar
div.current-progress div.current-progress
div.data div.data
span.number 30% span.number 30%
span.description completed span.description completed
ul ul
li li
span.number 12 span.number 12
span.description project<br />points span.description project<br />points
li li
span.number 23 span.number 23
span.description defined<br />points span.description defined<br />points
li li
span.number 12 span.number 12
span.description assigned<br />points span.description assigned<br />points
li li
span.number 23 span.number 23
span.description closed<br />points span.description closed<br />points

View File

@ -0,0 +1,21 @@
section.admin-menu
header
h1 Admin
nav
ul
li
a(href="") Memberships
span.icon.icon-arrow-right
li
a(href="") Role
span.icon.icon-arrow-right
li
a(href="") Sprints
span.icon.icon-arrow-right
li
a(href="") Project values
span.icon.icon-arrow-right
li
a(href="") Project profiles
span.icon.icon-arrow-right

View File

@ -0,0 +1,24 @@
section.admin-submenu
header
h1 Roles
nav
ul
li
a(href="") UX
span.icon.icon-arrow-right
li
a(href="") Product Owner
span.icon.icon-arrow-right
li
a(href="") Designer
span.icon.icon-arrow-right
li
a(href="") Back
span.icon.icon-arrow-right
li
a(href="") Front
span.icon.icon-arrow-right
a.button-gray(href="", title="Add New US")
span.text + New role

View File

@ -1,85 +1,48 @@
section.backlog-table section.backlog-table-header
div.row.backlog-table-header div.row.backlog-table-title
div.user-stories User Stories div.user-stories User Stories
div.status Status div.status Status
div.points Points div.points Points
div.points div.points
div.row.sub-title div.row.backlog-table-subtitle
div.user-stories.width-4 div.user-stories.width-4
div.status.width-2 div.status.width-2
div.points.width-1 Front div.points.width-1 Front
div.points.width-1 Total div.points.width-1 Total
div.row.table-main.blocked section.backlog-table-body
div.user-stories include ../components/backlog-row
div.user-story-name
input(type="checkbox", name="") // - for (var x = 0; x < 40; x++)
a(href="") Crear el perfil de usuario Senior en el admin // div.row
span.us-settings // div.user-stories
a.icon.icon-edit(href="", title="Edit") // div.user-story-name
a.icon.icon-delete(href="", title="Delete") // input(type="checkbox", name="")
div.user-story-tags // a(href="") Crear el perfil de usuario Senior en el admin
- for(var y = 0; y < 3; y++) // span.us-settings
include ../components/tag // a.icon.icon-edit(href="", title="Edit")
div.status.width-2 // a.icon.icon-delete(href="", title="Delete")
a(href="", title="Status Name") Status Name // div.user-story-tags
ul.popover.pop-status // - for(var y = 0; y < 3; y++)
li // include ../components/tag
a(href="", title="Status 1") Status 1 // div.status.width-2
li // a(href="", title="Status Name") Status Name
a(href="", title="Status 2") Status 2 // ul.popover.pop-status
li // li
a(href="", title="Status 3") Status 3 // a(href="", title="Status 1") Status 1
div.points // li
a(href="", title="Front") 24 // a(href="", title="Status 2") Status 2
ul.popover.pop-points-open // li
li // a(href="", title="Status 3") Status 3
a(href="", title="0") 0 // div.points
li // a(href="", title="") 24
a(href="", title="1/2") 1/2 // div.points
li // a(href="", title="Total Points") 43
a(href="", title="1") 1 // ul.popover.pop-status
li // li
a(href="", title="2") 2 // a(href="", title="Status 1") Status 1
li // li
a(href="", title="3") 3 // a(href="", title="Status 2") Status 2
li // li
a(href="", title="4") 4 // a(href="", title="Status 3") Status 3
li // a.icon.icon-drag-v(href="", title="Drag")
a(href="", title="8") 8 // hr.doom-line
li
a(href="", title="13") 13
li
a(href="", title="20") 20
li
a(href="", title="40") 40
li
a(href="", title="100") 100
li
a(href="", title="?") ?
div.points
a(href="", title="Total Points") 43
ul.popover.pop-status
li
a(href="", title="Status 1") Status 1
li
a(href="", title="Status 2") Status 2
li
a(href="", title="Status 3") Status 3
a.icon.icon-drag-v(href="", title="Drag")
hr.doom-line
- for (var x = 0; x < 50; x++)
div.row.table-main
div.user-stories
div.user-story-name
input(type="checkbox", name="")
a(href="") Crear el perfil de usuario Senior en el admin
span.us-settings
a.icon.icon-edit(href="", title="Edit")
a.icon.icon-delete(href="", title="Delete")
div.user-story-tags
- for(var y = 0; y < 3; y++)
include ../components/tag
div.status Status
div.points 12
div.points 54
a.icon.icon-drag-v(href="", title="Drag")

View File

@ -0,0 +1,63 @@
div.general-category
| Can do estimations?
div.check
input(type="checkbox", checked)
div
div.category-config-list
div.category-config
div.resume
div.resume-title Attachments
div.count 2/7
div.progress
span(style='width: 50%')
div.icon.icon-arrow-bottom
div.category-config
div.resume
div.resume-title User stories
div.count 2/7
div.progress
span(style='width: 20%')
div.icon.icon-arrow-bottom
div.category-config
div.resume
div.resume-title Issues
div.count 2/7
div.progress
span(style='width: 75%')
div.icon.icon-arrow-up
div.category-items
div.category-item
| Can modify owned user stories
div.check
input(type="checkbox")
div
div.category-item
| Can delete user story status
div.check
input(type="checkbox", checked)
div
div.category-item
| Can delete user story status
div.check.enabled
input(type="checkbox")
div
div.category-item
| Can delete user story statsu
div.check
input(type="checkbox", checked)
div
div.category-item
| Can delete user story status
div.check
input(type="checkbox")
div
div.category-config
div.resume
div.resume-title User stories
div.count 2/7
div.progress
span(style='width: 20%')
div.icon.icon-arrow-bottom

View File

@ -3,8 +3,10 @@ section.filters
h1 filters h1 filters
form form
fieldset fieldset
input(type="text", placeholder="Filter Filters") input(type="text", placeholder="Filter Filters", ng-model="filtersSearch.$")
a.icon.icon-search(href="", title="search") a.icon.icon-search(href="", title="search")
div.filter-list div.filter-list
- for (var x = 0; x < 10; x++) a.single-filter(ng-repeat="tag in filters.tags|filter:filtersSearch:strict"
include ../components/filter ng-class="{selected: tag.selected}")
span.name(tg-bo-html="tag.name")
span.number(tg-bo-html="tag.count")

View File

@ -1,8 +1,8 @@
a.close(href="", title="close") a.close(href="", title="close")
span.icon.icon-delete span.icon.icon-delete
form form
h2.title New Bulk h2.title(tg-i18n="common.new-bulk")
fieldset fieldset
textarea(placeholder="One user story per line") textarea(tg-i18n="placeholder:common.one-item-line", ng-model="form.data")
a.button.button-green(href="", title="Save") a.button.button-green(href="", tg-i18n="title:common.save")
span Create span(tg-i18n="common.save")

View File

@ -0,0 +1,24 @@
a.close(href="", title="close")
span.icon.icon-delete
form
h2.title New Member
fieldset
input(type="email", placeholder="Email")
select
option Front
option Role
option UX
a.icon.icon-delete(href="")
fieldset
input(type="email", placeholder="Email")
select
option Front
option Role
option UX
a.icon.icon-plus(href="")
a.button.button-green(href="", title="Save")
span Create
p.help-text We will add directly the users if they are registered, send an invitation to register if not

View File

@ -1,29 +1,32 @@
a.close(href="", title="close") a.close(href="", title="close")
span.icon.icon-delete span.icon.icon-delete
form form
h2.title New User Story h2.title(tg-i18n="us.title-new")
fieldset fieldset
input(type="text", placeholder="Subject") input(type="text", ng-model="us.subject", tg-i18n="placeholder:common.subject")
fieldset fieldset
select select(ng-model="us.status", ng-options="s.id as s.name for s in statusList",
option(selected, value="open") Open tg-i18n="placeholder:common.status")
option(selected, value="closed") Closed
fieldset fieldset
input(type="text", placeholder="Tags") input(type="text", placeholder="Tags", tg-tags, ng-model="us.tags")
fieldset fieldset
div.markdown-preview div.markdown-preview
a.active(href="", title="Edit") Edit a.edit.active(href="", title="Edit") Edit
a(href="", title="Preview") Preview a.preview(href="", title="Preview") Preview
textarea(placeholder="One user story per line") textarea(placeholder="One user story per line", ng-model="us.description")
div.new-us-settings div.new-us-settings
fieldset fieldset
label.requirement(for="team-requirement") Team Requirement label.requirement(for="team-requirement", tg-i18n="us.team-requirement")
input(type="checkbox", name="team-requirement", id="team-requirement") input(
type="checkbox", ng-model="us.team_requirement",
name="team-requirement", id="team-requirement")
fieldset fieldset
label.requirement(for="client-requirement") Team Requirement label.requirement(for="client-requirement", tg-i18n="us.client-requirement")
input(type="checkbox", name="client-requirement", id="client-requirement") input(
type="checkbox", ng-model="us.client_requirement",
name="client-requirement", id="client-requirement")
fieldset fieldset
label.blocked(for="blocked-us") Blocked label.blocked(for="blocked-us", tg-i18n="common.blocked")
input(type="checkbox", name="blocked-us", id="blocked-us") input(type="checkbox", ng-model="us.blocked", name="blocked-us", id="blocked-us")
a.button.button-green(href="", title="Save") a.button.button-green(href="", title="Save")
span Create span Create

View File

@ -0,0 +1,12 @@
a.close(href="", title="close")
span.icon.icon-delete
form
h2.title Delete User Story
p
span.delete-question Are you sure you want to delete?
span.subtitle #125 Crear el perfil de usuario senior en el admin
div.delete-options
a.button.button-green(href="", title="Accept")
span Accept
a.button.button-red(href="", title="Delete")
span Cancel

View File

@ -0,0 +1,15 @@
section.search-result-table
div.row.title
div.user-stories.width-6 Issue
div.status.width-2 Status
div.points.width-1 Assigned to
- for (var x = 0; x < 50; x++)
div.row.table-main
div.user-stories.width-6
div.user-story-name
a(href="") Crear el perfil de usuario Senior en el admin
div.status.width-2 Status
div.points.width-1
figure.avatar
img(src="http://thecodeplayer.com/u/uifaces/12.jpg", alt="username")
figcaption Pilar

View File

@ -10,8 +10,7 @@ section.sprints
a.button-green(href="", title="Add New US") a.button-green(href="", title="Add New US")
span.text + New sprint span.text + New sprint
// If is current sprint section.sprint(ng-repeat="sprint in sprints track by sprint.id", tg-backlog-sprint="sprint")
section.sprint.sprint-current
header header
div.sprint-summary div.sprint-summary
a.icon.icon-arrow-up(href="", title="compact Sprint") a.icon.icon-arrow-up(href="", title="compact Sprint")
@ -27,56 +26,83 @@ section.sprints
div.sprint-progress-bar div.sprint-progress-bar
div.current-progress div.current-progress
div.sprint-table div.sprint-table
- for (var x = 0; x < 10; x++) div.row.milestone-us-item-row(ng-repeat="us in sprint.user_stories track by us.id")
div.row div.column-us.width-8
div.column-us.width-8 a.us-name(href="", title="")
a.us-name(href="", title="") #125 Crear el perfil de usuario Senior en el admin span(tg-bo-ref="us.ref")
div.column-points.width-1 45 span(tg-bo-html="us.subject")
a.button.button-gray(href="", title="Current Sprint Taksboard") div.column-points.width-1(tg-bo-html="us.total_points")
a.button.button-gray(href="", tg-nav="project-taskboard:project=projectId,sprint=sprint.id",
title="Current Sprint Taskboard")
span Sprint Taskboard span Sprint Taskboard
// If Sprint is open but date is old // If is current sprint
section.sprint.sprint-old-open // section.sprint.sprint-current
header // header
div.sprint-summary // div.sprint-summary
a.icon.icon-arrow-up(href="", title="compact Sprint") // a.icon.icon-arrow-up(href="", title="compact Sprint")
span.sprint-name old open sprint // span.sprint-name current sprint
span.sprint-date 04/05/14-03/06/14 // span.sprint-date 04/06/14-20/06/14
ul // ul
li // li
span.number 20 // span.number 12
span.description closed<br />points // span.description closed<br />points
li // li
span.number 24 // span.number 24
span.description total<br />points // span.description total<br />points
div.sprint-progress-bar // div.sprint-progress-bar
div.current-progress // div.current-progress
div.sprint-table // div.sprint-table
- for (var x = 0; x < 10; x++) // - for (var x = 0; x < 10; x++)
div.row // div.row
div.column-us.width-8 // div.column-us.width-8
a(href="", title="") #125 Crear el perfil de usuario Senior en el admin // a.us-name(href="", title="") #125 Crear el perfil de usuario Senior en el admin
div.column-points.width-1 45 // div.column-points.width-1 45
// a.button.button-gray(href="", title="Current Sprint Taksboard")
// span Sprint Taskboard
// If Sprint is closed and date is old // // If Sprint is open but date is old
section.sprint.sprint-closed // section.sprint.sprint-old-open
header // header
div.sprint-summary // div.sprint-summary
a.icon.icon-arrow-up(href="", title="compact Sprint") // a.icon.icon-arrow-up(href="", title="compact Sprint")
span.sprint-name old sprint // span.sprint-name old open sprint
span.sprint-date 04/04/14-03/05/14 // span.sprint-date 04/05/14-03/06/14
ul // ul
li // li
span.number 24 // span.number 20
span.description closed<br />points // span.description closed<br />points
li // li
span.number 24 // span.number 24
span.description total<br />points // span.description total<br />points
div.sprint-progress-bar // div.sprint-progress-bar
div.current-progress // div.current-progress
div.sprint-table // div.sprint-table
- for (var x = 0; x < 10; x++) // - for (var x = 0; x < 10; x++)
div.row // div.row
div.column-us.width-8 // div.column-us.width-8
a(href="", title="") #125 Crear el perfil de usuario Senior en el admin // a(href="", title="") #125 Crear el perfil de usuario Senior en el admin
div.column-points.width-1 45 // div.column-points.width-1 45
// // If Sprint is closed and date is old
// section.sprint.sprint-closed
// header
// div.sprint-summary
// a.icon.icon-arrow-up(href="", title="compact Sprint")
// span.sprint-name old sprint
// span.sprint-date 04/04/14-03/05/14
// ul
// li
// span.number 24
// span.description closed<br />points
// li
// span.number 24
// span.description total<br />points
// div.sprint-progress-bar
// div.current-progress
// div.sprint-table
// - for (var x = 0; x < 10; x++)
// div.row
// div.column-us.width-8
// a(href="", title="") #125 Crear el perfil de usuario Senior en el admin
// div.column-points.width-1 45

View File

@ -21,37 +21,44 @@
} }
} }
.button-green { .button-green,
.button-gray,
.button-red {
@extend %button; @extend %button;
@include transition (background .3s linear); @include transition (background .3s linear);
background: $green-taiga;
span { span {
color: $white; color: $white;
position: relative; position: relative;
top: 2px; top: 2px;
} }
&:hover { &:hover {
@include transition (background .3s linear); @include transition (background .3s linear);
}
}
.button-green {
background: $green-taiga;
&:hover {
background: $fresh-taiga; background: $fresh-taiga;
} }
} }
.button-gray { .button-gray {
@extend %button;
@include transition (background .3s linear);
background: $button-gray; background: $button-gray;
span {
color: $white;
position: relative;
top: 2px;
}
&:hover { &:hover {
@include transition (background .3s linear);
background: $button-gray-hover; background: $button-gray-hover;
color: $white; color: $white;
} }
} }
.button-red {
background: $red-light;
&:hover {
background: $red;
color: $white;
}
}
.button-bulk { .button-bulk {
@extend %button; @extend %button;
background: $green-taiga; background: $green-taiga;

View File

@ -12,6 +12,11 @@
color: $grayer; color: $grayer;
opacity: 1; opacity: 1;
} }
&.selected {
@include transition (opacity .2s linear);
color: $grayer;
opacity: 1;
}
.name, .name,
.number { .number {
padding: 8px 10px; padding: 8px 10px;

View File

@ -38,7 +38,7 @@
margin-right: .5em; margin-right: .5em;
} }
.taskboard-text { .taskboard-text {
@include table-flex-child($flex-grow: 10, $flex-basis: 50px, $width: 100px); @include table-flex-child($flex-grow: 10, $flex-basis: 50px);
} }
.icon-edit, .icon-edit,
.icon-drag-h { .icon-drag-h {

View File

@ -13,6 +13,8 @@ $fresh-taiga: #9dce0a;
$dark-taiga: #879b89; $dark-taiga: #879b89;
$dry-taiga: #70a87d; $dry-taiga: #70a87d;
$morning-taiga: #7ab987; $morning-taiga: #7ab987;
$dark-grayish-lime-green: #8b9e8d;
$very-light-gray: #e3e3e3;
$red-light: #ff8282; $red-light: #ff8282;
$red: #f00; $red: #f00;

View File

@ -4,11 +4,12 @@ fieldset {
padding: 0; padding: 0;
position: relative; position: relative;
width: 100%; width: 100%;
.icon { // xavi pleeeeeease
position: absolute; // .icon {
right: 10px; // position: absolute;
top: 6px; // right: 10px;
} // top: 6px;
// }
} }
input[type="text"], input[type="text"],

View File

@ -192,3 +192,6 @@ a:visited {
.icon-attachment:before { .icon-attachment:before {
content: 'A'; content: 'A';
} }
.icon-reload:before {
content: 'z';
}

View File

@ -26,12 +26,21 @@ body {
} }
.menu-secondary { .menu-secondary {
background: $whitish;
flex-basis: 260px; flex-basis: 260px;
flex-grow: 1; flex-grow: 1;
flex-shrink: 0; flex-shrink: 0;
padding: 2em 1em; padding: 2em 1em;
} }
.menu-tertiary {
background-color: $dark-grayish-lime-green;
flex-basis: 190px;
flex-grow: 1;
flex-shrink: 0;
padding: 2em 1em;
}
.extrabar { .extrabar {
background: $whitish; background: $whitish;
// display: none; // display: none;
@ -47,3 +56,7 @@ body {
.icon { .icon {
font-family: 'taiga'; font-family: 'taiga';
} }
.hidden {
display: none;
}

View File

@ -25,28 +25,29 @@ $prefix-for-spec: true;
@import 'components/filter'; @import 'components/filter';
@import 'components/taskboard-task'; @import 'components/taskboard-task';
//Layout
@import 'layout/base';
@import 'layout/backlog';
@import 'layout/taskboard';
@import 'layout/us-detail';
//Modules //Modules
@import 'modules/nav'; @import 'modules/nav';
@import 'modules/sidebar';
@import 'modules/sprints'; @import 'modules/sprints';
@import 'modules/burndown'; @import 'modules/burndown';
@import 'modules/backlog-table'; @import 'modules/backlog-table';
@import 'modules/filters'; @import 'modules/filters';
@import 'modules/lightbox'; @import 'modules/lightbox';
@import 'modules/taskboard-table'; @import 'modules/taskboard-table';
@import 'modules/attachments';
@import 'modules/search-filter'; @import 'modules/search-filter';
@import 'modules/search-result-table'; @import 'modules/search-result-table';
@import 'modules/comments'; @import 'modules/admin-menu';
@import 'modules/comment-activity'; @import 'modules/admin-submenu';
@import 'modules/activity'; @import 'modules/admin-membership';
@import 'modules/admin-roles';
@import 'modules/admin-functionalities';
@import 'modules/category-config';
@import 'modules/project-details';
// Responsive // Responsive
@import 'responsive/mobile'; @import 'responsive/mobile';
@import 'responsive/screen'; @import 'responsive/screen';
//Layout
@import 'layout/base';
@import 'layout/backlog';
@import 'layout/taskboard';

View File

@ -0,0 +1,32 @@
.admin-functionalities {
.functionality {
background-color: $whitish;
display: flex;
margin-bottom: 1rem;
padding: 2rem;
.icon,
.desc {
opacity: .5;
}
p {
margin-bottom: 0;
}
span {
font-weight: bold;
}
select {
margin-top: 1rem;
}
&.active {
background-color: #e9f0da;
div,
p {
opacity: 1;
}
}
}
.icon {
@extend %xxlarge;
margin-right: 2rem;
}
}

View File

@ -0,0 +1,115 @@
.admin-membership {
header {
@include clearfix;
margin-bottom: 1rem;
h1 {
float: left;
margin-bottom: 0;
}
a {
float: right;
}
}
}
.admin-membership-table {
align-content: stretch;
align-items: center;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
.title {
font-family: 'DroidSans-Bold';
}
.row {
align-content: stretch;
align-items: center;
border-bottom: 1px solid $gray-light;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
padding: 1rem 0 1rem 1rem;
text-align: left;
width: 100%;
&:last-child {
border-bottom: 0;
}
}
.avatar {
align-items: center;
display: flex;
figcaption {
margin-left: 1rem;
}
img {
flex-basis: 35px;
}
.name,
.email {
display: block;
width: 100%;
}
.name {
font-family: DroidSans-Bold;
}
.email {
color: $gray-light;
}
}
.active,
.pending {
padding: 8px;
width: 115px;
.icon {
@extend %large;
}
}
.active {
background-color: $whitish;
}
.pending {
background-color: $red-light;
color: $white;
.icon {
float: right;
}
&:hover {
@include transition (background-color .3s linear);
background-color: $red;
}
}
.header-role,
.header-status {
padding-left: .5rem;
}
.row-role {
padding-right: 1rem;
}
.row-status {
display: flex;
.delete {
@extend %large;
align-items: center;
color: $gray-light;
display: flex;
margin-left: 15px;
padding: 0 15px;
&:hover {
color: $red;
}
}
}
.row-status,
.header-status {
width: 180px;
}
.row-member,
.row-role,
.header-member,
.header-role {
flex: 1 0 50px;
}
}

View File

@ -0,0 +1,26 @@
.admin-menu {
li {
@extend %xlarge;
border-bottom: 1px solid $gray-light;
font-family: 'ostrichSans';
&:last-child {
border-bottom: 0;
}
}
a {
display: block;
padding: 1rem 0 1rem 1rem;
&.active,
&:hover {
.icon {
@include transition (opacity .3s linear);
opacity: 1;
}
}
}
.icon {
color: $blackish;
float: right;
opacity: 0;
}
}

View File

@ -0,0 +1,53 @@
.admin-roles {
.total {
@extend %large;
background-color: $whitish;
font-family: DroidSans-Bold;
padding: .5rem 1rem;
span {
@extend %medium;
font-family: DroidSans;
padding-left: .5rem;
}
}
.general-category {
align-items: center;
display: flex;
justify-content: flex-end;
padding-bottom: 2rem;
.check {
margin-left: .5rem;
}
}
.check {
background-color: #cfcfcf;
border-radius: 2px;
cursor: pointer;
height: 25px;
overflow: hidden;
position: relative;
width: 65px;
input[type=checkbox] {
cursor: pointer;
height: 500px;
left: -10px;
opacity: 0;
position: absolute;
top: -10px;
width: 500px;
+ div {
@include transition (all .2s linear);
background-color: $button-gray;
height: 25px;
width: 50%;
}
}
input[type=checkbox]:checked {
+ div {
@include transition (all .2s linear);
background-color: #74a218;
margin-left: 50%;
}
}
}
}

View File

@ -0,0 +1,38 @@
.admin-submenu {
h1 {
color: $white;
}
li {
@extend %xlarge;
border-bottom: 1px solid #a6b2a7;
font-family: 'ostrichSans';
&:last-child {
border-bottom: 0;
}
}
a {
color: $white;
display: block;
padding: 1rem 0 1rem 1rem;
&.active,
&:hover {
color: $blackish;
.icon {
@include transition (opacity .3s linear);
opacity: 1;
}
}
}
.icon {
color: $white;
float: right;
opacity: 0;
}
.button-gray {
padding: .5rem 0;
text-align: center;
&:hover {
background-color: darken($button-gray-hover, 15%);
}
}
}

View File

@ -1,57 +1,23 @@
.backlog-table { .backlog-table-header,
.backlog-table-body {
@include table-flex(); @include table-flex();
width: 100%; width: 100%;
.row { .row {
@include table-flex(); @include table-flex();
padding: 1rem 0 1rem 1rem; padding: 1rem 0 1rem 1rem;
position: relative;
text-align: left; text-align: left;
width: 100%; width: 100%;
}
.row { //Previously table-main
@extend %small;
border-bottom: 1px solid $gray-light;
}
.backlog-table-title,
.backlog-table-subtitle,
.row {
&:hover { &:hover {
background: lighten($green-taiga, 60%); background: transparent;
@include transition (background .2s ease-in);
.us-settings {
opacity: 1;
@include transition (opacity .2s ease-in);
}
} }
}
.row-selected {
background: lighten($green-taiga, 60%);
@include transition (background .2s ease-in);
}
.user-story-name {
flex-basis: 500px;
input {
vertical-align: top;
}
span {
display: inline-block;
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon {
@extend %medium;
color: $gray-light;
&:hover {
color: $grayer;
@include transition (color .3s linear);
}
}
}
.user-story-tags {
display: none;
margin-top: .3rem;
}
.backlog-table-header {
@extend %medium;
font-family: 'DroidSans-Bold';
}
.backlog-table-header,
.sub-title,
.table-main {
.user-stories { .user-stories {
@include table-flex-child(20, 100px, 0, 0); @include table-flex-child(20, 100px, 0, 0);
} }
@ -62,58 +28,10 @@
@include table-flex-child(1, 100px, 0, 0); @include table-flex-child(1, 100px, 0, 0);
} }
} }
.backlog-table-header,
.sub-title {
&:hover {
background: transparent;
}
}
.sub-title {
@extend %small;
background: $whitish;
border-bottom: 2px solid $grayer;
font-family: 'DroidSans';
&:hover {
background: $whitish;
}
}
.table-main {
@extend %small;
border-bottom: 1px solid $gray-light;
}
.status, .status,
.points { .points {
position: relative; position: relative;
} }
.blocked {
background: $red-light;
color: $white;
&:hover {
background: $red;
@include transition (background .2s ease-in);
}
a {
color: $white;
&:hover {
color: $white;
}
}
.icon {
@extend %medium;
color: $white;
&:hover {
color: $white;
}
}
}
.doom-line {
background: $red;
border-bottom: 2px solid lighten($red, 10%);
border-top: 2px solid darken($red, 10%);
height: 4px;
margin: .5rem 0;
width: 100%;
}
.pop-status { .pop-status {
@include popover(150px, '', 30px, 10px, ''); @include popover(150px, '', 30px, 10px, '');
} }
@ -135,23 +53,95 @@
} }
} }
} }
}
.backlog-table-header {
.backlog-table-title {
@extend %medium;
font-family: 'DroidSans-Bold';
}
.backlog-table-subtitle {
@extend %small;
background: $whitish;
border-bottom: 2px solid $grayer;
font-family: 'DroidSans';
&:hover {
background: $whitish;
}
}
}
.backlog-table-body {
.row {
&:hover {
@include transition (background .2s ease-in);
background: lighten($green-taiga, 60%);
.us-settings {
@include transition (opacity .2s ease-in);
opacity: 1;
}
}
}
.row-selected {
@include transition (background .2s ease-in);
background: lighten($green-taiga, 60%);
}
.user-story-name {
flex-basis: 500px;
input {
vertical-align: top;
}
span {
display: inline-block;
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon {
color: $gray-light;
&:hover {
color: $grayer;
@include transition (color .3s linear);
}
}
}
.user-story-tags {
display: none;
margin-top: .3rem;
}
.blocked {
background: $red-light;
color: $white;
&:hover {
background: $red;
@include transition (background .2s ease-in);
}
a {
color: $white;
&:hover {
color: $white;
}
}
.icon {
color: $white;
&:hover {
color: $white;
}
}
}
.doom-line {
background: $red;
border-bottom: 2px solid lighten($red, 10%);
border-top: 2px solid darken($red, 10%);
height: 4px;
margin: .5rem 0;
width: 100%;
}
.us-settings { .us-settings {
float: right; float: right;
margin-right: 2rem; margin-right: 2rem;
opacity: 0; opacity: 0;
@include transition (opacity .2s ease-in); @include transition (opacity .2s ease-in);
} }
.icon-drag-v {
@include transition(color .2s linear);
@extend %large;
color: $gray-light;
position: absolute;
right: .5rem;
top: 30%;
&:hover {
@include transition(color .2s linear);
color: $grayer;
cursor: move;
}
}
} }

View File

@ -0,0 +1,52 @@
.category-config {
border-bottom: 1px solid $gray-light;
&:first-child {
border-top: 1px solid $gray-light;
}
.resume {
cursor: pointer;
display: flex;
padding: 1rem;
position: relative;
}
.resume-title {
line-height: 28px;
width: 280px;
}
.count {
color: $gray-light;
line-height: 28px;
}
.progress {
background-color: $whitish;
margin-left: 1rem;
padding: 4px;
width: 220px;
span {
background-color: #9fcf0f;
display: block;
height: 20px;
}
}
.icon {
@extend %xlarge;
line-height: 28px;
position: absolute;
right: 1rem;
top: 1rem;
}
.category-items {
background-color: $whitish;
padding: 2rem 1rem;
width: 100%;
}
.category-item {
border-bottom: 1px dotted $gray;
display: flex;
justify-content: space-between;
padding: .5rem .5rem .5rem 2rem;
&:last-child {
border-bottom: 0;
}
}
}

View File

@ -36,7 +36,6 @@
} }
.lightbox_add-new-us { .lightbox_add-new-us {
display: none;
form { form {
flex-basis: 0; flex-basis: 0;
flex-grow: 0; flex-grow: 0;
@ -104,12 +103,12 @@
border: 1px solid $fresh-taiga; border: 1px solid $fresh-taiga;
color: $white; color: $white;
} }
} &.selected {
.requirement-selected { @include transition(all .2s ease-in);
@include transition(all .2s ease-in); background: $green-taiga;
background: $green-taiga; border: 1px solid $green-taiga;
border: 1px solid $green-taiga; color: $white;
color: $white; }
} }
.blocked { .blocked {
&:hover { &:hover {
@ -118,12 +117,12 @@
border: 1px solid $red-light; border: 1px solid $red-light;
color: $white; color: $white;
} }
} &.selected {
.blocked-selected { @include transition(all .2s ease-in);
@include transition(all .2s ease-in); background: $red;
background: $red; border: 1px solid $red;
border: 1px solid $red; color: $white;
color: $white; }
} }
input[type="checkbox"] { input[type="checkbox"] {
display: none; display: none;
@ -132,7 +131,6 @@
} }
.lightbox_add-bulk { .lightbox_add-bulk {
display: none;
form { form {
flex-basis: 0; flex-basis: 0;
flex-grow: 0; flex-grow: 0;
@ -147,8 +145,45 @@
} }
} }
.lightbox_add-sprint { .ligbox_add-member {
display: none; display: none;
fieldset {
@include clearfix;
margin-bottom: 1rem;
}
input[type=email],
select {
float: left;
margin-bottom: 0;
}
input[type=email] {
width: 430px;
}
select {
margin-left: .5rem;
width: 255px;
}
.icon {
@extend %large;
float: left;
line-height: 40px;
margin-left: .5rem;
}
.icon-delete {
&:hover {
color: $red;
}
}
.button {
margin-top: 2rem;
}
.help-text {
@extend %small;
padding: .5rem 1rem;
}
}
.lightbox_add-sprint {
form { form {
flex-basis: 0; flex-basis: 0;
flex-grow: 0; flex-grow: 0;
@ -175,3 +210,31 @@
} }
} }
} }
.lightbox_confirm-delete {
form {
flex-basis: 0;
flex-grow: 0;
flex-shrink: 0;
min-width: 420px;
width: 420px;
}
.delete-question,
.subtitle {
display: block;
line-height: 2rem;
text-align: center;
}
.subtitle {
@extend %large;
font-family: 'ostrichSans';
}
.delete-options {
@include table-flex();
a {
@include table-flex-child(1, 0, 0);
padding: 8px 0;
text-align: center;
}
}
}

View File

@ -0,0 +1,20 @@
.project-details {
input[type="text"],
textarea {
@extend %medium;
background-color: $very-light-gray;
font-family: 'DroidSans';
font-weight: bold;
}
fieldset {
margin-bottom: 1rem;
}
textarea {
height: 300px;
}
.button-green {
display: block;
padding: 12px;
text-align: center;
}
}

View File

@ -8,7 +8,7 @@
width: 100%; width: 100%;
.row { .row {
align-content: stretch; align-content: stretch;
align-items: stretch; align-items: center;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
@ -69,4 +69,14 @@
.points { .points {
position: relative; position: relative;
} }
.avatar {
align-items: center;
display: flex;
img {
flex-basis: 35px;
}
figcaption {
margin-left: 1rem;
}
}
} }

View File

@ -1,3 +0,0 @@
.sidebar {
background: $whitish;
}

81
bower.json Normal file
View File

@ -0,0 +1,81 @@
{
"name": "taiga-layout",
"version": "0.1.0",
"homepage": "https://github.com/taiga.io/taiga-layout",
"authors": [
{
"name": "Andrey Antukh",
"email": "niwi@niwi.be"
},
{
"name": "Jesus Espino Garcia",
"email": "jespinog@gmail.com"
},
{
"name": "David Barragán Merino",
"email": "dbarragan@dbarragan.com"
},
{
"name": "Xavi Julian",
"email": "xavier.julian@kaleidos.net"
},
{
"name": "Alejandro Alonso",
"email": "alejandro.alonso@kaleidos.net"
},
{
"name": "Anler Hernández",
"email": "hello@anler.me"
},
{
"name": "Juan Francisco Alcántara",
"email": "juanfran.alcantara@kaleidos.net"
}
],
"description": "Taiga project management system (frontend)",
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "git@github.com:taigaio/taiga-front.git"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"app/vendor",
"test",
"tests"
],
"dependencies": {
"lodash": "~2.4.1",
"jade": "~1.3.1",
"emoticons": "~0.1.7",
"jquery-flot": "~0.8.2",
"angular": "1.2.17",
"angular-route": "1.2.17",
"angular-animate": "1.2.17",
"angular-sanitize": "1.2.17",
"angular-mocks": "1.2.17",
"kalendae": "~0.4.1",
"checksley": "~0.5.0",
"i18next": "~1.7.1",
"jquery": "~2.1.1",
"select2": "~3.4.5",
"angular-ui-select2": "~0.0.5",
"google-diff-match-patch-js": "~1.0.0",
"underscore.string": "~2.3.3",
"markitup": "~1.1.14",
"jquery-textcomplete": "yuku-t/jquery-textcomplete#~0.1.1",
"flot-orderBars": "emmerich/flot-orderBars",
"moment": "~2.6.0",
"isMobile": "~0.3.1",
"favico.js": "0.3.4",
"Sortable": "~0.1.8"
},
"resolutions": {
"lodash": "~2.4.1",
"moment": "~2.6.0",
"jquery": "~2.1.1"
},
"private": true
}

View File

@ -0,0 +1,7 @@
config = {
host: "localhost:8000"
scheme: "http"
debug: true
}
angular.module("taigaLocalConfig", []).value("localconfig", config)

View File

@ -19,5 +19,6 @@
"regex-selectors": false, "regex-selectors": false,
"floats": false, "floats": false,
"fallback-colors": false, "fallback-colors": false,
"adjoining-classes": false "adjoining-classes": false,
"qualified-headings": false
} }

216
gulpfile.coffee Normal file
View File

@ -0,0 +1,216 @@
gulp = require("gulp")
jade = require("gulp-jade")
coffee = require("gulp-coffee")
concat = require("gulp-concat")
uglify = require("gulp-uglify")
plumber = require("gulp-plumber")
wrap = require("gulp-wrap")
rename = require("gulp-rename")
minifyHTML = require("gulp-minify-html")
sass = require("gulp-ruby-sass")
csslint = require("gulp-csslint")
minifyCSS = require("gulp-minify-css")
imagemin = require("gulp-imagemin")
watch = require("gulp-watch")
size = require("gulp-filesize")
notify = require("gulp-notify")
connect = require("gulp-connect")
scsslint = require("gulp-scss-lint")
newer = require("gulp-newer")
cache = require("gulp-cached")
paths = {
app: "app"
dist: "dist"
html: "app/*.html"
jade: "app/partials/**/*.jade"
appStyles: "app/styles/**/*.scss"
distStyles: "dist/styles"
sassMain: "app/styles/main.scss"
css: "dist/styles/**/*.css"
images: "app/images/**/*"
locales: "app/locales/**/*.json"
coffee: ["app/coffee/app.coffee",
"config/main.coffee",
"app/coffee/*.coffee",
"app/coffee/modules/controllerMixins.coffee",
"app/coffee/modules/*.coffee",
"app/coffee/modules/backlog/*.coffee",
"app/coffee/modules/locales/*.coffee",
"app/coffee/modules/base/*.coffee",
"app/coffee/modules/resources/*.coffee"]
vendorJsLibs: [
"app/vendor/jquery/dist/jquery.js",
"app/vendor/lodash/dist/lodash.js",
"app/vendor/emoticons/lib/emoticons.js",
"app/vendor/underscore.string/lib/underscore.string.js",
"app/vendor/angular/angular.js",
"app/vendor/angular-route/angular-route.js",
"app/vendor/angular-sanitize/angular-sanitize.js",
"app/vendor/angular-animate/angular-animate.js",
"app/vendor/i18next/i18next.js",
"app/js/Sortable.js"
]
}
# Ordered list of vendor/external libraries.
##############################################################################
# Layout/CSS Related tasks
##############################################################################
gulp.task "jade", ->
gulp.src(paths.jade)
.pipe(plumber())
.pipe(jade({pretty: true}))
.pipe(gulp.dest("#{paths.dist}/partials"))
gulp.task "template", ->
gulp.src("#{paths.app}/index.jade")
.pipe(plumber())
.pipe(jade({pretty: true, locals:{v:(new Date()).getTime()}}))
.pipe(gulp.dest(paths.dist))
# Sass lint
gulp.task "scss-lint", ->
gulp.src([paths.appStyles, "!/**/bourbon/**/*.scss"])
.pipe(cache("scsslint"))
.pipe(scsslint({config: "scsslint.yml"}))
# Sass Files
gulp.task "sass", ->
gulp.src(paths.sassMain)
.pipe(plumber())
.pipe(sass())
.pipe(gulp.dest(paths.distStyles))
# CSS Linting and report
gulp.task "css", ["sass"], ->
gulp.src([paths.css, "!#{paths.dist}/styles/vendor/**/*.css"])
.pipe(csslint("csslintrc.json"))
.pipe(csslint.reporter())
# Minify CSS
gulp.task "minifyCSS", ["css", "sass"], ->
gulp.src("dist/styles/main.css")
.pipe(minifyCSS())
.pipe(gulp.dest(paths.distStyles))
.pipe(size())
gulp.task "imagemin", ->
gulp.src(paths.images)
.pipe(plumber())
.pipe(imagemin({progressive: true}))
.pipe(gulp.dest(paths.dist+"/images"))
##############################################################################
# JS Related tasks
##############################################################################
gulp.task "coffee", ->
gulp.src(paths.coffee)
.pipe(plumber())
.pipe(coffee())
.pipe(concat("app.js"))
.pipe(gulp.dest("dist/js/"))
gulp.task "jslibs", ->
gulp.src(paths.vendorJsLibs)
.pipe(plumber())
.pipe(concat("libs.js"))
.pipe(gulp.dest("dist/js/"))
gulp.task "locales", ->
gulp.src("app/locales/en/app.json")
.pipe(wrap("angular.module('taigaLocales').constant('localesEnglish', <%= contents %>);"))
.pipe(rename("localeEnglish.coffee"))
.pipe(gulp.dest("app/coffee/modules/locales"))
# gulp.src("app/locales/es/app.json")
# .pipe(wrap("angular.module('locales.es', []).constant('locales.es', <%= contents %>);"))
# .pipe(rename("locale.es.coffee"))
# .pipe(gulp.dest("app/coffee/"))
##############################################################################
# Common tasks
##############################################################################
# Copy Files
gulp.task "copy", ["sass"], ->
gulp.src("#{paths.app}/fonts/*")
.pipe(gulp.dest("#{paths.dist}/fonts/"))
gulp.src("#{paths.app}/images/*")
.pipe(gulp.dest("#{paths.dist}/images/"))
gulp.task "connect", ->
connect.server({
root: paths.dist
livereload: true
})
# Rerun the task when a file changes
gulp.task "watch", ->
gulp.watch(paths.jade, ["jade"])
gulp.watch(paths.appStyles, ["scss-lint", "sass", "css"])
gulp.watch(paths.coffee, ["coffee"])
gulp.watch(paths.vendorJsLibs, ["jslibs"])
gulp.watch(paths.locales, ["locales"])
gulp.task "express", ->
express = require("express")
app = express()
app.use("/js", express.static("#{__dirname}/dist/js"))
app.use("/styles", express.static("#{__dirname}/dist/styles"))
app.use("/images", express.static("#{__dirname}/dist/images"))
app.use("/partials", express.static("#{__dirname}/dist/partials"))
app.use("/fonts", express.static("#{__dirname}/dist/fonts"))
app.all "/*", (req, res, next) ->
# Just send the index.html for other files to support HTML5Mode
res.sendfile("index.html", {root: "#{__dirname}/dist/"})
app.listen(9001)
# The default task (called when you run gulp from cli)
gulp.task "default", [
"jade",
"template",
"sass",
"css",
"copy",
"locales",
"coffee",
"jslibs",
"connect",
"express",
"watch"
]
# The default task (called when you run `gulp` from cli)
gulp.task "dist", [
"jade",
"sass",
"css",
"minifyCSS",
"imagemin",
"copy",
"connect",
"watch"
]

View File

@ -1,186 +0,0 @@
var gulp = require("gulp"),
jade = require("gulp-jade"),
coffee = require("gulp-coffee"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
plumber = require("gulp-plumber"),
wrap = require("gulp-wrap"),
rename = require("gulp-rename"),
newer = require("gulp-newer"),
minifyHTML = require("gulp-minify-html"),
sass = require("gulp-ruby-sass"),
csslint = require("gulp-csslint"),
minifyCSS = require("gulp-minify-css"),
imagemin = require("gulp-imagemin"),
watch = require("gulp-watch"),
size = require("gulp-filesize"),
notify = require("gulp-notify"),
connect = require("gulp-connect"),
scsslint = require("gulp-scss-lint"),
newer = require("gulp-newer")
cache = require("gulp-cached");
var paths = {
app: "app",
dist: "dist",
html: "app/*.html",
jade: "app/partials/**/*.jade",
appStyles: "app/styles/**/*.scss",
distStyles: "dist/styles",
sassMain: "app/styles/main.scss",
css: "dist/styles/**/*.css",
images: "app/images/**/*"
};
////////////////////////////////////////////////////////////////////////////
// Layout/CSS Related tasks
////////////////////////////////////////////////////////////////////////////
gulp.task("jade", function() {
return gulp.src(paths.jade)
.pipe(plumber())
.pipe(jade({pretty: true}))
.pipe(gulp.dest(paths.dist + "/partials"));
});
// Sass lint
gulp.task("scss-lint", function() {
gulp.src([paths.appStyles, "!/**/bourbon/**/*.scss"])
.pipe(cache("scsslint"))
.pipe(scsslint({config: "scsslint.yml"}))
});
// Sass Files
gulp.task("sass", function () {
return gulp.src(paths.sassMain)
.pipe(plumber())
.pipe(sass())
.pipe(gulp.dest(paths.distStyles));
});
// CSS Linting and report
gulp.task("css", ["sass"], function() {
gulp.src([paths.css, "!"+paths.dist+"/styles/vendor/**/*.css"])
.pipe(csslint("csslintrc.json"))
.pipe(csslint.reporter());
});
// Minify CSS
gulp.task("minifyCSS", ["css", "sass"], function () {
gulp.src("dist/styles/main.css")
.pipe(minifyCSS())
.pipe(gulp.dest(paths.distStyles))
.pipe(size());
});
gulp.task("imagemin", function () {
return gulp.src(paths.images)
.pipe(plumber())
.pipe(imagemin({progressive: true}))
.pipe(gulp.dest(paths.dist+"/images"));
});
////////////////////////////////////////////////////////////////////////////
// JS Related tasks
////////////////////////////////////////////////////////////////////////////
gulp.task("coffee", function() {
return gulp.src(coffeeSources)
.pipe(plumber())
.pipe(coffee())
.pipe(concat("app.js"))
.pipe(gulp.dest("app/dist/js/"));
});
gulp.task("jslibs", function() {
return gulp.src(externalSources)
.pipe(plumber())
.pipe(concat("libs.js"))
.pipe(gulp.dest("app/dist/js/"));
});
gulp.task("locales", function() {
gulp.src("app/locales/en/app.json")
.pipe(wrap("angular.module('locales.en', []).constant('locales.en', <%= contents %>);"))
.pipe(rename("locale.en.coffee"))
.pipe(gulp.dest("app/coffee/"));
gulp.src("app/locales/es/app.json")
.pipe(wrap("angular.module('locales.es', []).constant('locales.es', <%= contents %>);"))
.pipe(rename("locale.es.coffee"))
.pipe(gulp.dest("app/coffee/"));
});
////////////////////////////////////////////////////////////////////////////
// Common tasks
////////////////////////////////////////////////////////////////////////////
// Copy Files
gulp.task("copy", ["sass"], function() {
// Copy fonts
gulp.src(paths.app+"/fonts/*")
.pipe(gulp.dest(paths.dist+"/fonts/"));
gulp.src(paths.app+"/images/*")
.pipe(gulp.dest(paths.dist+"/images/"));
});
gulp.task("connect", function() {
connect.server({
root: paths.dist,
livereload: true
});
});
// Rerun the task when a file changes
gulp.task("watch", function() {
gulp.watch(paths.jade, ["jade"]);
gulp.watch(paths.appStyles, ["scss-lint", "sass", "css"]);
});
gulp.task("express", function() {
var express = require("express");
var app = express();
app.use("/js", express.static(__dirname + "/app/js"));
app.use("/components", express.static(__dirname + "/app/components"));
app.use("/dist", express.static(__dirname + "/app/dist"));
app.use("/less", express.static(__dirname + "/app/less"));
app.use("/img", express.static(__dirname + "/app/img"));
app.use("/partials", express.static(__dirname + "/app/partials"));
app.use("/fonts", express.static(__dirname + "/app/fonts"));
app.all("/*", function(req, res, next) {
// Just send the index.html for other files to support HTML5Mode
res.sendfile("index.html", { root: __dirname + "/app/" });
});
app.listen(9001);
});
// The default task (called when you run `gulp` from cli)
gulp.task("default", [
"jade",
"sass",
"css",
"copy",
"connect",
"watch"
]);
// The default task (called when you run `gulp` from cli)
gulp.task("dist", [
"jade",
"sass",
"css",
"minifyCSS",
"imagemin",
"copy",
"connect",
"watch"
]);

View File

@ -1,7 +1,7 @@
{ {
"name": "TaigaIO", "name": "TaigaIO",
"version": "0.0.1", "version": "0.0.1",
"description": "Landing page for Taiga", "description": "Taiga project management system (frontend)",
"main": "index.js", "main": "index.js",
"keywords": [ "keywords": [
"Taiga", "Taiga",
@ -9,10 +9,15 @@
"Project Management", "Project Management",
"Github" "Github"
], ],
"author": "Kaleidos", "author": "Kaleidos OpenSource SL",
"license": "ISC", "licenses": [
{
"type": "AGPL-3.0",
"url": "https://github.com/taigaio/taiga-front/blob/master/LICENSE"
}
],
"devDependencies": { "devDependencies": {
"gulp": "^3.6.0", "gulp": "^3.8.0",
"coffee-script": "^1.7.1", "coffee-script": "^1.7.1",
"express": "^4.3.0", "express": "^4.3.0",
"gulp-clean": "^0.2.4", "gulp-clean": "^0.2.4",