Browse Source

initial commit

damien 11 years ago
commit
9130a5c1ad
100 changed files with 21423 additions and 0 deletions
  1. 4 0
      pboard/MANIFEST.in
  2. 27 0
      pboard/README.txt
  3. 70 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/about.mak.py
  4. 222 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak.py
  5. 68 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/data.mak.py
  6. 65 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/environ.mak.py
  7. 50 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/error.mak.py
  8. 38 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/iconset.mak.py
  9. 55 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/index.mak.py
  10. 58 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/login.mak.py
  11. 217 0
      pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/master.mak.py
  12. 142 0
      pboard/development.ini
  13. 73 0
      pboard/migration/env.py
  14. 22 0
      pboard/migration/script.py.mako
  15. 0 0
      pboard/migration/versions/empty.txt
  16. 10 0
      pboard/pboard.egg-info/PKG-INFO
  17. 58 0
      pboard/pboard.egg-info/SOURCES.txt
  18. 1 0
      pboard/pboard.egg-info/dependency_links.txt
  19. 6 0
      pboard/pboard.egg-info/entry_points.txt
  20. 1 0
      pboard/pboard.egg-info/not-zip-safe
  21. 10 0
      pboard/pboard.egg-info/requires.txt
  22. 1 0
      pboard/pboard.egg-info/top_level.txt
  23. 2 0
      pboard/pboard/__init__.py
  24. 2 0
      pboard/pboard/config/__init__.py
  25. 92 0
      pboard/pboard/config/app_cfg.py
  26. 101 0
      pboard/pboard/config/deployment.ini_tmpl
  27. 9 0
      pboard/pboard/config/environment.py
  28. 39 0
      pboard/pboard/config/middleware.py
  29. 2 0
      pboard/pboard/controllers/__init__.py
  30. 22 0
      pboard/pboard/controllers/controller.template
  31. 30 0
      pboard/pboard/controllers/error.py
  32. 156 0
      pboard/pboard/controllers/root.py
  33. 27 0
      pboard/pboard/controllers/secure.py
  34. 36 0
      pboard/pboard/controllers/template.py
  35. 24 0
      pboard/pboard/i18n/ru/LC_MESSAGES/pboard.po
  36. 2 0
      pboard/pboard/lib/__init__.py
  37. 18 0
      pboard/pboard/lib/app_globals.py
  38. 30 0
      pboard/pboard/lib/base.py
  39. 80 0
      pboard/pboard/lib/dbapi.py
  40. 17 0
      pboard/pboard/lib/helpers.py
  41. 63 0
      pboard/pboard/model/__init__.py
  42. 172 0
      pboard/pboard/model/auth.py
  43. 117 0
      pboard/pboard/model/data.py
  44. 22 0
      pboard/pboard/model/model.template
  45. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/.DS_Store
  46. 44 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css
  47. 299 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js
  48. 1 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min.js
  49. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/.DS_Store
  50. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/.DS_Store
  51. 686 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap-responsive.css
  52. 12 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap-responsive.min.css
  53. 3990 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.css
  54. 689 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.min.css
  55. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/img/.DS_Store
  56. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/img/glyphicons-halflings.png
  57. BIN
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/.DS_Store
  58. 1726 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/bootstrap.js
  59. 6 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/bootstrap.min.js
  60. 4 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/jquery-1.7.1.min.js
  61. 9463 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js
  62. 260 0
      pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.min.js
  63. 9 0
      pboard/pboard/public/css/bootstrap-responsive.min.css
  64. 9 0
      pboard/pboard/public/css/bootstrap.min.css
  65. 418 0
      pboard/pboard/public/css/glyphicons.css
  66. 42 0
      pboard/pboard/public/css/style.css
  67. BIN
      pboard/pboard/public/favicon.ico
  68. BIN
      pboard/pboard/public/img/glyphicons-grey.png
  69. BIN
      pboard/pboard/public/img/glyphicons-halflings-white.original.png
  70. BIN
      pboard/pboard/public/img/glyphicons-halflings.original.png
  71. BIN
      pboard/pboard/public/img/glyphicons-white.png
  72. BIN
      pboard/pboard/public/img/glyphicons.png
  73. BIN
      pboard/pboard/public/img/turbogears_logo.png
  74. BIN
      pboard/pboard/public/img/turbogears_logo_big.png
  75. BIN
      pboard/pboard/public/img/under_the_hood_blue.png
  76. 6 0
      pboard/pboard/public/javascript/bootstrap.min.js
  77. 0 0
      pboard/pboard/templates/__init__.py
  78. 190 0
      pboard/pboard/templates/about.mak
  79. 204 0
      pboard/pboard/templates/dashboard.mak
  80. 27 0
      pboard/pboard/templates/data.mak
  81. 23 0
      pboard/pboard/templates/environ.mak
  82. 22 0
      pboard/pboard/templates/error.mak
  83. 66 0
      pboard/pboard/templates/iconset.mak
  84. 142 0
      pboard/pboard/templates/index.mak
  85. 11 0
      pboard/pboard/templates/login.mak
  86. 63 0
      pboard/pboard/templates/master.html
  87. 170 0
      pboard/pboard/templates/master.mak
  88. 7 0
      pboard/pboard/templates/simple_mako.mak
  89. 69 0
      pboard/pboard/tests/__init__.py
  90. 2 0
      pboard/pboard/tests/functional/__init__.py
  91. 84 0
      pboard/pboard/tests/functional/test_authentication.py
  92. 73 0
      pboard/pboard/tests/functional/test_root.py
  93. 64 0
      pboard/pboard/tests/models/__init__.py
  94. 52 0
      pboard/pboard/tests/models/test_auth.py
  95. 19 0
      pboard/pboard/websetup/__init__.py
  96. 55 0
      pboard/pboard/websetup/bootstrap.py
  97. 28 0
      pboard/pboard/websetup/schema.py
  98. 49 0
      pboard/setup.cfg
  99. 78 0
      pboard/setup.py
  100. 0 0
      pboard/test.ini

+ 4 - 0
pboard/MANIFEST.in View File

@@ -0,0 +1,4 @@
1
+recursive-include pboard/public *
2
+include pboard/public/favicon.ico
3
+recursive-include pboard/i18n *
4
+recursive-include pboard/templates *

+ 27 - 0
pboard/README.txt View File

@@ -0,0 +1,27 @@
1
+This file is for you to describe the pboard application. Typically
2
+you would include information such as the information below:
3
+
4
+Installation and Setup
5
+======================
6
+
7
+Install ``pboard`` using the setup.py script::
8
+
9
+    $ cd pboard
10
+    $ python setup.py develop
11
+
12
+Create the project database for any model classes defined::
13
+
14
+    $ gearbox setup-app
15
+
16
+Start the paste http server::
17
+
18
+    $ gearbox serve
19
+
20
+While developing you may want the server to reload after changes in package files (or its dependencies) are saved. This can be achieved easily by adding the --reload option::
21
+
22
+    $ gearbox serve --reload --debug
23
+
24
+Then you are ready to go.
25
+
26
+# Icons are the glyphicons icon set taken from https://github.com/ericzhang-cn/full-glyphicons
27
+

File diff suppressed because it is too large
+ 70 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/about.mak.py


+ 222 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak.py View File

@@ -0,0 +1,222 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378722899.890202
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/dashboard.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['node_treeview', 'get_icon_class_from_node_type', 'title', 'node_treeview_in_select_field']
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        root_node_list = context.get('root_node_list', UNDEFINED)
32
+        tg = context.get('tg', UNDEFINED)
33
+        current_node = context.get('current_node', UNDEFINED)
34
+        def node_treeview(node_list,indentation=0):
35
+            return render_node_treeview(context._locals(__M_locals),node_list,indentation)
36
+        def node_treeview_in_select_field(node_list,indentation):
37
+            return render_node_treeview_in_select_field(context._locals(__M_locals),node_list,indentation)
38
+        __M_writer = context.writer()
39
+        # SOURCE LINE 1
40
+        __M_writer(u'\n')
41
+        # SOURCE LINE 4
42
+        __M_writer(u'\n\n')
43
+        # SOURCE LINE 31
44
+        __M_writer(u'\n\n')
45
+        # SOURCE LINE 44
46
+        __M_writer(u'\n\n')
47
+        # SOURCE LINE 48
48
+        __M_writer(u'\n\n  <div class="row">\n    <div class="span3">\n      <legend>\n        Documents\n      </legend>\n\n      <!-- Button to trigger modal -->\n      <p>\n        <a href="#addFolderNode" role="button" class="btn" data-toggle="modal">\n          <i class="icon-g-circle-plus"></i> Create document</a>\n      </p>\n      <!-- Modal -->\n      <div id="addFolderNode" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">\n        <div class="modal-header">\n          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">\xd7</button>\n          <h3 id="myModalLabel">Create a new page</h3>\n        </div>\n        <div class="modal-body">\n          <form id="create_document_form" method="POST" action="')
49
+        # SOURCE LINE 68
50
+        __M_writer(escape(tg.url('/create_document')))
51
+        __M_writer(u'" class="form-horizontal">\n            <div class="control-group">\n              <label class="control-label" for="data_label">Title</label>\n              <div class="controls">\n                <input type="text" id="data_label" name="data_label" placeholder="page title...">\n              </div>\n            </div>\n            <div class="control-group">\n              <label class="control-label" for="parent_id">As child of...</label>\n              <div class="controls">\n                <select id="parent_id" name="parent_id" placeholder="as child of...">\n                  ')
52
+        # SOURCE LINE 79
53
+        __M_writer(escape(node_treeview_in_select_field(root_node_list, 0)))
54
+        __M_writer(u'\n                </select>\n              </div>\n            </div>\n            <div class="control-group">\n              <label class="control-label" for="data_content">Description</label>\n              <div class="controls">\n\n                <textarea id="data_content" name="data_content"></textarea>\n              </div>\n            </div>\n          </form>\n        </div>\n        <div class="modal-footer">\n          <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>\n          <button id="create_document_save_button" class="btn btn-primary">Save changes</button>\n        </div>\n      </div>\n\n      <div>\n        <table class="table table-striped table-hover table-condensed">\n          ')
55
+        # SOURCE LINE 100
56
+        __M_writer(escape(node_treeview(root_node_list)))
57
+        __M_writer(u'\n        </table>\n      </div>\n    </div>\n    <div class="span5">\n      <div class="page-header">\n        <h3>')
58
+        # SOURCE LINE 106
59
+        __M_writer(escape(current_node.data_label))
60
+        __M_writer(u'</h3>\n      </div>\n\n      <div class="btn-group">\n        <button class="btn"><i class="icon-g-edit"></i> Edit</button>\n\n      </div>\n\n      <div class="btn-group">\n        <a class="btn btn-primary" href="#"><i class="icon-g-stats icon-g-white"></i> Status</a>\n        <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>\n        <ul class="dropdown-menu">\n        \n          \n  \n          <li><a class="btn-success" href="#"><i class="icon-g-sun"></i> Open</a></li>\n          <li><a class="btn-warning" href="#"><i class="icon-g-rotation-lock"></i> in Standby</a></li>\n          <li><a class="btn-danger"  href="#"><i class="icon-g-circle-exclamation-mark"></i> Hot</a></li>\n          <li><a class="btn " href="#"><i class="icon-g-ok"></i> Finished</a></li>\n          <li><a class="btn btn-disabled" href="#"><i class="icon-g-ban"></i> Archived</a></li>\n        </ul>\n\n      </div>\n\n      <div class="btn-group">\n        <a class="btn btn-primary" href="#" ><i class="icon-g-circle-plus icon-g-white"></i> Add</a>\n        <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>\n        <ul class="dropdown-menu">\n          <li><a href="#"><i class="icon-g-calendar" ></i> Event</a></li>\n          <li><a href="#"><i class="icon-g-comments"></i> Comment</a></li>\n          <li><a href="#"><i class="icon-g-user"></i> Contact</a></li>\n          <li><a href="#"><i class="icon-g-attach"></i> File</a></li>\n        </ul>\n      </div>\n\n      <div class="btn-group">\n        <button class="btn btn-danger"><i class="icon-g-white icon-g-remove"></i> Delete</button>\n      </div>\n      \n    \n      <div>\n        ')
61
+        # SOURCE LINE 147
62
+        __M_writer(current_node.data_content)
63
+        __M_writer(u'\n      </div>\n    </div>\n    <div class="span4">\n      <div class="tabbable">\n        <ul class="nav nav-tabs">\n            <li class="active">\n              <a href="#events" data-toggle="tab" title="History"><i class="icon-g-calendar"></i></a>\n            </li>\n            <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i> </a></li>\n            <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-comments"></i> </a></li>\n            <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i> </a></li>\n        </ul>\n        <div class="tab-content">\n            <div class="tab-pane active" id="events">\n              <!--p class="text-right" >\n                <button class="text-right btn btn-info " type="button"><i class="icon-g-plus icon-g-white"></i> new event</button>\n              </p-->\n              <table class="table table-striped table-hover table-condensed">\n                <thead>\n                  <tr>\n                    <th>Date</th>\n                    <th>Time</th>\n                    <th>\n                      Event\n                    </th>\n                    <th>\n                      <a href="" title="Add an event"><i class="icon-g-plus"></i></a>\n                    </th>\n                  </tr>\n                </thead>\n')
64
+        # SOURCE LINE 178
65
+        for event in current_node.getEvents():
66
+            # SOURCE LINE 179
67
+            __M_writer(u'                <tr title="Last updated: ')
68
+            __M_writer(escape(event.updated_at))
69
+            __M_writer(u'">\n                   <td>')
70
+            # SOURCE LINE 180
71
+            __M_writer(escape(event.getFormattedDate(event.data_datetime)))
72
+            __M_writer(u'</td>\n                   <td>')
73
+            # SOURCE LINE 181
74
+            __M_writer(escape(event.getFormattedTime(event.data_datetime)))
75
+            __M_writer(u'</td>\n                   <td>')
76
+            # SOURCE LINE 182
77
+            __M_writer(escape(event.data_label))
78
+            __M_writer(u'</td>\n                   <td>\n                     <a href=""><i class="icon-g-edit"></i></a>\n                   </td>\n                </tr>\n')
79
+        # SOURCE LINE 188
80
+        __M_writer(u'              </table>\n            </div>\n            <div class="tab-pane" id="contacts">\n')
81
+        # SOURCE LINE 191
82
+        for contact in current_node.getContacts():
83
+            # SOURCE LINE 192
84
+            __M_writer(u'                <div class="well">\n                  <legend class="text-info">')
85
+            # SOURCE LINE 193
86
+            __M_writer(escape(contact.data_label))
87
+            __M_writer(u'</legend>\n                  <div>')
88
+            # SOURCE LINE 194
89
+            __M_writer(contact.data_content)
90
+            __M_writer(u'</div>\n                </div>\n')
91
+        # SOURCE LINE 197
92
+        __M_writer(u'            </div>\n            <div class="tab-pane" id="comments">')
93
+        # SOURCE LINE 198
94
+        __M_writer(current_node.data_content)
95
+        __M_writer(u'</div>\n            <div class="tab-pane" id="files">Files</div>\n        </div>\n      </div>\n    </div>\n  </div>\n\n')
96
+        return ''
97
+    finally:
98
+        context.caller_stack._pop_frame()
99
+
100
+
101
+def render_node_treeview(context,node_list,indentation=0):
102
+    __M_caller = context.caller_stack._push_frame()
103
+    try:
104
+        def node_treeview(node_list,indentation=0):
105
+            return render_node_treeview(context,node_list,indentation)
106
+        len = context.get('len', UNDEFINED)
107
+        tg = context.get('tg', UNDEFINED)
108
+        __M_writer = context.writer()
109
+        # SOURCE LINE 6
110
+        __M_writer(u'\n')
111
+        # SOURCE LINE 7
112
+        if len(node_list)>0:
113
+            # SOURCE LINE 8
114
+            __M_writer(u'    <!--ul style="list-style:none; margin-left: ')
115
+            __M_writer(escape((indentation+1)*0.5))
116
+            __M_writer(u'em;"-->\n')
117
+            # SOURCE LINE 9
118
+            for node in node_list:
119
+                # SOURCE LINE 10
120
+                __M_writer(u'      <tr title="Last updated: ')
121
+                __M_writer(escape(node.updated_at))
122
+                __M_writer(u'">\n        <td style="padding-left: ')
123
+                # SOURCE LINE 11
124
+                __M_writer(escape((indentation+1)*0.5))
125
+                __M_writer(u'em;">\n          <a href="?node=')
126
+                # SOURCE LINE 12
127
+                __M_writer(escape(node.node_id))
128
+                __M_writer(u'" title="')
129
+                __M_writer(escape(node.data_label))
130
+                __M_writer(u'">\n            <i class=\'')
131
+                # SOURCE LINE 13
132
+                __M_writer(escape(node.getIconClass()))
133
+                __M_writer(u"'></i>\n")
134
+                # SOURCE LINE 14
135
+                if len(node.data_label)<=15:
136
+                    # SOURCE LINE 15
137
+                    __M_writer(u'              ')
138
+                    __M_writer(escape(node.data_label))
139
+                    __M_writer(u'\n')
140
+                    # SOURCE LINE 16
141
+                else:
142
+                    # SOURCE LINE 17
143
+                    __M_writer(u'              ')
144
+                    __M_writer(escape(node.data_label[0:15]))
145
+                    __M_writer(u'...\n')
146
+                # SOURCE LINE 19
147
+                __M_writer(u'          </a>\n        </td>\n        <td class="text-right">\n          <a href="')
148
+                # SOURCE LINE 22
149
+                __M_writer(escape(tg.url('/move_node_upper?node_id=%i'%(node.node_id))))
150
+                __M_writer(u'" title="Move up"><i class=" icon-g-up-arrow"></i></a>\n          <a href="')
151
+                # SOURCE LINE 23
152
+                __M_writer(escape(tg.url('/move_node_lower?node_id=%i'%(node.node_id))))
153
+                __M_writer(u'" title="Move down"><i class=" icon-g-down-arrow"></i></a>\n          <a href="" title="Edit"><i class="icon-g-edit"></i></a>\n        </td>\n      </tr>\n      ')
154
+                # SOURCE LINE 27
155
+                __M_writer(escape(node_treeview(node.getChildren(), indentation+1)))
156
+                __M_writer(u'\n')
157
+            # SOURCE LINE 29
158
+            __M_writer(u'    <!--/ul-->\n')
159
+        return ''
160
+    finally:
161
+        context.caller_stack._pop_frame()
162
+
163
+
164
+def render_get_icon_class_from_node_type(context,node_type):
165
+    __M_caller = context.caller_stack._push_frame()
166
+    try:
167
+        __M_writer = context.writer()
168
+        # SOURCE LINE 2
169
+        __M_writer(u'\n\n')
170
+        return ''
171
+    finally:
172
+        context.caller_stack._pop_frame()
173
+
174
+
175
+def render_title(context):
176
+    __M_caller = context.caller_stack._push_frame()
177
+    try:
178
+        __M_writer = context.writer()
179
+        # SOURCE LINE 46
180
+        __M_writer(u'\nLearning TurboGears 2.3: Quick guide to the Quickstart pages.\n')
181
+        return ''
182
+    finally:
183
+        context.caller_stack._pop_frame()
184
+
185
+
186
+def render_node_treeview_in_select_field(context,node_list,indentation):
187
+    __M_caller = context.caller_stack._push_frame()
188
+    try:
189
+        def node_treeview_in_select_field(node_list,indentation):
190
+            return render_node_treeview_in_select_field(context,node_list,indentation)
191
+        len = context.get('len', UNDEFINED)
192
+        __M_writer = context.writer()
193
+        # SOURCE LINE 33
194
+        __M_writer(u'\n')
195
+        # SOURCE LINE 34
196
+        if len(node_list)>0:
197
+            # SOURCE LINE 35
198
+            if indentation==0:
199
+                # SOURCE LINE 36
200
+                __M_writer(u'        <option style="margin-left: ')
201
+                __M_writer(escape(0.5*indentation))
202
+                __M_writer(u'em; color: #CCC;" value="0">no parent...</option>\n')
203
+            # SOURCE LINE 38
204
+            for node in node_list:
205
+                # SOURCE LINE 39
206
+                __M_writer(u'        <option style="margin-left: ')
207
+                __M_writer(escape(0.5*indentation))
208
+                __M_writer(u'em;" value="')
209
+                __M_writer(escape(node.node_id))
210
+                __M_writer(u'">')
211
+                __M_writer(escape(node.data_label))
212
+                __M_writer(u'</option>\n        ')
213
+                # SOURCE LINE 40
214
+                __M_writer(escape(node_treeview_in_select_field(node.getChildren(), indentation+1)))
215
+                __M_writer(u'\n')
216
+            # SOURCE LINE 42
217
+            __M_writer(u'      </ul>\n')
218
+        return ''
219
+    finally:
220
+        context.caller_stack._pop_frame()
221
+
222
+

+ 68 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/data.mak.py View File

@@ -0,0 +1,68 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378373693.265038
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/data.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/data.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['title']
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        tg = context.get('tg', UNDEFINED)
32
+        params = context.get('params', UNDEFINED)
33
+        __M_writer = context.writer()
34
+        # SOURCE LINE 1
35
+        __M_writer(u'\n\n')
36
+        # SOURCE LINE 5
37
+        __M_writer(u'\n\n<h2>Content Type Dispatch</h2>\n<p>\nThis page shows how you can provide multiple pages\ndirectly from the same controller method.  This page is generated \nfrom the expose decorator with the template defintion provided.\nYou can provide a url with parameters and this page will display\nthe parameters as html, and the json version will express\nthe entries as JSON.  Here, try it out: <a href="/data.html?a=1&b=2">/data.html?a=1&b=2</a>\n</p>\n\n<p>Click here for the <a href="')
38
+        # SOURCE LINE 17
39
+        __M_writer(escape(tg.url('/data.json', params=params)))
40
+        __M_writer(u'">JSON Version of this page.</a></p>\n<p>The data provided in the template call is: \n    <table>\n')
41
+        # SOURCE LINE 20
42
+        for key, value in params.items():
43
+            # SOURCE LINE 21
44
+            __M_writer(u'            <tr>\n                <td>')
45
+            # SOURCE LINE 22
46
+            __M_writer(escape(key))
47
+            __M_writer(u'</td>\n                <td>')
48
+            # SOURCE LINE 23
49
+            __M_writer(escape(value))
50
+            __M_writer(u'</td>\n            </tr>\n')
51
+        # SOURCE LINE 26
52
+        __M_writer(u'    </table>\n\n')
53
+        return ''
54
+    finally:
55
+        context.caller_stack._pop_frame()
56
+
57
+
58
+def render_title(context):
59
+    __M_caller = context.caller_stack._push_frame()
60
+    try:
61
+        __M_writer = context.writer()
62
+        # SOURCE LINE 3
63
+        __M_writer(u'\n  Welcome to TurboGears 2.3, standing on the shoulders of giants, since 2007\n')
64
+        return ''
65
+    finally:
66
+        context.caller_stack._pop_frame()
67
+
68
+

+ 65 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/environ.mak.py View File

@@ -0,0 +1,65 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378373679.629635
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/environ.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/environ.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['title']
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        environment = context.get('environment', UNDEFINED)
32
+        sorted = context.get('sorted', UNDEFINED)
33
+        __M_writer = context.writer()
34
+        # SOURCE LINE 1
35
+        __M_writer(u'\n\n')
36
+        # SOURCE LINE 5
37
+        __M_writer(u'\n\n<h2>The WSGI nature of the framework</h2>\n  <p>In this page you can see all the WSGI variables your request object has, \n     the ones in capital letters are required by the spec, then a sorted by\n     component list of variables provided by the Components, and at last\n     the "wsgi." namespace with very useful information about your WSGI Server</p>\n  <p>The keys in the environment are: \n  <table class="table">\n')
38
+        # SOURCE LINE 14
39
+        for key in sorted(environment):
40
+            # SOURCE LINE 15
41
+            __M_writer(u'      <tr>\n          <td>')
42
+            # SOURCE LINE 16
43
+            __M_writer(escape(key))
44
+            __M_writer(u'</td>\n          <td>')
45
+            # SOURCE LINE 17
46
+            __M_writer(escape(environment[key]))
47
+            __M_writer(u'</td>\n      </tr>\n')
48
+        # SOURCE LINE 20
49
+        __M_writer(u'  </table>\n\n  </p>\n\n')
50
+        return ''
51
+    finally:
52
+        context.caller_stack._pop_frame()
53
+
54
+
55
+def render_title(context):
56
+    __M_caller = context.caller_stack._push_frame()
57
+    try:
58
+        __M_writer = context.writer()
59
+        # SOURCE LINE 3
60
+        __M_writer(u'\n  Learning TurboGears 2.3: Information about TG and WSGI\n')
61
+        return ''
62
+    finally:
63
+        context.caller_stack._pop_frame()
64
+
65
+

+ 50 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/error.mak.py View File

@@ -0,0 +1,50 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378288240.889538
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/error.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/error.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = []
14
+
15
+
16
+def render_body(context,**pageargs):
17
+    __M_caller = context.caller_stack._push_frame()
18
+    try:
19
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
20
+        message = context.get('message', UNDEFINED)
21
+        code = context.get('code', UNDEFINED)
22
+        __M_writer = context.writer()
23
+        # SOURCE LINE 1
24
+        __M_writer(u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\n                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\n\n<head>\n  <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>\n  <title>A ')
25
+        # SOURCE LINE 7
26
+        __M_writer(escape(code))
27
+        __M_writer(u' Error has Occurred </title>\n</head>\n\n<body>\n<h1>Error ')
28
+        # SOURCE LINE 11
29
+        __M_writer(escape(code))
30
+        __M_writer(u'</h1>\n\n')
31
+        # SOURCE LINE 13
32
+
33
+        import re
34
+        mf = re.compile(r'(</?)script', re.IGNORECASE)
35
+        def fixmessage(message):
36
+            return mf.sub(r'\1noscript', message)
37
+        
38
+        
39
+        __M_locals_builtin_stored = __M_locals_builtin()
40
+        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['re','mf','fixmessage'] if __M_key in __M_locals_builtin_stored]))
41
+        # SOURCE LINE 18
42
+        __M_writer(u'\n\n<div>')
43
+        # SOURCE LINE 20
44
+        __M_writer(fixmessage(message) )
45
+        __M_writer(u'</div>\n</body>\n</html>\n')
46
+        return ''
47
+    finally:
48
+        context.caller_stack._pop_frame()
49
+
50
+

+ 38 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/iconset.mak.py View File

@@ -0,0 +1,38 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378713536.869768
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/iconset.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/iconset.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = []
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        __M_writer = context.writer()
32
+        # SOURCE LINE 1
33
+        __M_writer(u'\n\n\n        <style>\n            body{\n                padding-top: 60px;\n            }\n            #icon_grid li{\n                width: 23%;\n            }\n        </style>\n\n        <div class="navbar navbar-inverse navbar-fixed-top">\n            <div class="navbar-inner">\n                <div class="container">\n                    <a class="brand" href="./index.html">Glyphicons</a>\n                </div>\n            </div>\n        </div>\n        \n        <div class="container">\n            \n            <div class="hero-unit">\n                List Of icons\n            </div>\n            \n            <div id="icon_grid">\n                <ul class="inline">\n\n                </ul>\n            </div>\n        </div>\n\n\n    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>\n    <script>\n      $(document).ready(function() {\n        function matchStyle(className) {\n          var result = [];\n          for (var id = 0; id < document.styleSheets.length; id++) {\n            var classes = document.styleSheets[id].rules || document.styleSheets[id].cssRules;\n            for (var x = 0; x < classes.length; x++) {\n              // $(\'#icon_grid\').append(classes[x].selectorText);\n              // $(\'#icon_grid\').append("<p>bob ---</p>");\n              var item = classes[x];\n              if (classes[x]!=null) {\n                if(classes[x].selectorText!=null) {\n                  if (-1 < classes[x].selectorText.indexOf(className)) {\n                    result.push(classes[x].selectorText);\n                  }\n                }\n              }\n            }\n          }\n          return result;\n        }\n\n        var $iconList = matchStyle(\'.icon-g-\');\n        var $grid = $(\'#icon_grid ul\');\n        for (var key in $iconList) {\n          var icon = $iconList[key];\n          icon = icon.replace(\'.\', \'\');\n          $grid.append($(\'<li>\').append($(\'<i>\').addClass(icon)).append(" " + icon));\n        }\n      });</script>\n\n')
34
+        return ''
35
+    finally:
36
+        context.caller_stack._pop_frame()
37
+
38
+

+ 55 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/index.mak.py View File

@@ -0,0 +1,55 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378381585.28781
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/index.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/index.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['title']
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        h = context.get('h', UNDEFINED)
32
+        __M_writer = context.writer()
33
+        # SOURCE LINE 1
34
+        __M_writer(u'\n\n')
35
+        # SOURCE LINE 5
36
+        __M_writer(u'\n\n  <div class="row">\n    <div class="span9 hidden-phone hidden-tablet">\n      <div class="hero-unit">\n        <h1>pod <small>your information compagnion</small></h1>\n      </div>\n\n      <div class="row">\n        <div class="span3">\n          <h3>Store structured data</h3>\n          <ul>\n            <li>contact information,</li>\n            <li>notes, files,</li>\n            <li>todos, events, reminders,</li>\n            <li>...</li>\n          </ul>\n        </div>\n\n        <div class="span3">\n          <h3>Share information</h3>\n          <ul>\n            <li>Data is private, shared or public,</li>\n            <li>Send notification to co-workers,</li>\n            <li>Work together on the same data,</li>\n            <li>...</li>\n          </ul>\n        </div>\n\n        <div class="span3">\n          <h3>Manage Lifetime</h3>\n          <ul>\n            <li>Real life and information timelines,</li>\n            <li>Explore the life of information,</li>\n            <li>Create, open and close projects,</li>\n            <li>...</li>\n          </ul>\n        </div>\n      </div>\n\n      <div class="row">\n        <div class="span9">\n          <h3>Is it for me ?</h3>\n          <p>\n            You are prospecting clients? Looking for a job? Taking notes for your work? You\'re not sure ?\n          </p>\n          <p class="alert aler-warning">\n            Hey! What do you risk? Give it a try!\n          </p>\n        </div>\n      </div>\n      <div>\n        <h2>What can I do with pod ?</h2>\n        <ul style="list-style:none;">\n          <li><i class="icon-chevron-right"></i> Manage projects and tasks during their entire life:\n            <ul style="list-style:none;">\n              <li><i class="icon-chevron-right"></i> Create events and reminders</li>\n              <li><i class="icon-chevron-right"></i> Take and keep notes</li>\n              <li><i class="icon-chevron-right"></i> Keep contact information about people</li>\n              <li><i class="icon-chevron-right"></i> Organise data and information</li>\n            </ul>\n          </li>\n          <li>\n            <i class="icon-chevron-right"></i> Share up-to-date information:\n            <ul style="list-style:none;">\n              <li><i class="icon-chevron-right"></i> Organize and update information</li>\n              <li><i class="icon-chevron-right"></i> Send notifications to friends</li>\n              <li><i class="icon-chevron-right"></i> Manage information life</li>\n            </ul>\n          </li>\n        </ul>\n        If you see this page it means your installation was successful!</p>\n        <p>TurboGears 2 is rapid web application development toolkit designed to make your life easier.</p>\n        <p>\n          <a class="btn btn-primary btn-large" href="http://www.turbogears.org" target="_blank">\n            ')
37
+        # SOURCE LINE 80
38
+        __M_writer(escape(h.icon('book', True)))
39
+        __M_writer(u' Learn more\n          </a>\n        </p>\n      </div>\n    </div>\n    <div class="span3">\n      <form class="well">\n        <fieldset>\n          <legend>Sign up</legend>\n          <input type="text" id="email" placeholder="Email"><br/>\n          <input type="text" id="password" placeholder="Password"><br/>\n          <input type="text" id="retype_password" placeholder="Retype your password"><br/>\n          <input type="submit" id="submit" value="Sign up" /><br/>\n        </fieldset>\n      </form>\n      \n      <div class="popover bottom">\n        <div class="arrow"></div>\n        <h3 class="popover-title">\n          Why to sign up ?\n        </h3>\n        <div>\n          <p>\n            blabla\n          </p>\n        </div>\n      </div>\n      <div class="alert alert-info">\n        <strong>Why to sign up ?</strong>\n      </div>\n      <div class="well">\n        <p>\n          <i class="icon-signal"></i> Make information live\n        </p>\n        <p>\n          <i class="icon-refresh"></i> Share up-to-date information\n        </p>\n        <p>\n          <i class="icon-list"></i> Manage tasks and projects\n        </p>\n      </div>\n    </div>\n  </div>\n\n  <div class="row">\n    <div class="span4">\n      <h3>Code your data model</h3>\n      <p> Design your data <code>model</code>, Create the database, and Add some bootstrap data.</p>\n    </div>\n\n    <div class="span4">\n      <h3>Design your URL architecture</h3>\n      <p> Decide your URLs, Program your <code>controller</code> methods, Design your\n        <code>templates</code>, and place some static files (CSS and/or Javascript). </p>\n    </div>\n\n    <div class="span4">\n      <h3>Distribute your app</h3>\n      <p> Test your source, Generate project documents, Build a distribution.</p>\n    </div>\n  </div>\n\n  <div class="notice"> Thank you for choosing TurboGears.</div>\n')
40
+        return ''
41
+    finally:
42
+        context.caller_stack._pop_frame()
43
+
44
+
45
+def render_title(context):
46
+    __M_caller = context.caller_stack._push_frame()
47
+    try:
48
+        __M_writer = context.writer()
49
+        # SOURCE LINE 3
50
+        __M_writer(u'\n  Welcome to TurboGears 2.3, standing on the shoulders of giants, since 2007\n')
51
+        return ''
52
+    finally:
53
+        context.caller_stack._pop_frame()
54
+
55
+

+ 58 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/login.mak.py View File

@@ -0,0 +1,58 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378286981.976473
8
+_enable_loop = True
9
+_template_filename = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/login.mak'
10
+_template_uri = '/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/login.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['title']
14
+
15
+
16
+def _mako_get_namespace(context, name):
17
+    try:
18
+        return context.namespaces[(__name__, name)]
19
+    except KeyError:
20
+        _mako_generate_namespaces(context)
21
+        return context.namespaces[(__name__, name)]
22
+def _mako_generate_namespaces(context):
23
+    pass
24
+def _mako_inherit(template, context):
25
+    _mako_generate_namespaces(context)
26
+    return runtime._inherit_from(context, u'local:templates.master', _template_uri)
27
+def render_body(context,**pageargs):
28
+    __M_caller = context.caller_stack._push_frame()
29
+    try:
30
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
31
+        tg = context.get('tg', UNDEFINED)
32
+        login_counter = context.get('login_counter', UNDEFINED)
33
+        came_from = context.get('came_from', UNDEFINED)
34
+        dict = context.get('dict', UNDEFINED)
35
+        __M_writer = context.writer()
36
+        # SOURCE LINE 1
37
+        __M_writer(u'\n')
38
+        # SOURCE LINE 2
39
+        __M_writer(u'\n<div id="loginform">\n<form action="')
40
+        # SOURCE LINE 4
41
+        __M_writer(escape(tg.url('/login_handler', params=dict(came_from=came_from, __logins=login_counter))))
42
+        __M_writer(u'" method="POST" class="loginfields">\n    <h2><span>Login</span></h2>\n    <label for="login">Username:</label><input type="text" id="login" name="login" class="text"></input><br/>\n    <label for="password">Password:</label><input type="password" id="password" name="password" class="text"></input>\n    <label id="labelremember" for="loginremember">remember me</label><input type="checkbox" id="loginremember" name="remember" value="2252000"/>\n    <input type="submit" id="submit" value="Login" />\n</form>\n</div>')
43
+        return ''
44
+    finally:
45
+        context.caller_stack._pop_frame()
46
+
47
+
48
+def render_title(context):
49
+    __M_caller = context.caller_stack._push_frame()
50
+    try:
51
+        __M_writer = context.writer()
52
+        # SOURCE LINE 2
53
+        __M_writer(u'Login Form')
54
+        return ''
55
+    finally:
56
+        context.caller_stack._pop_frame()
57
+
58
+

+ 217 - 0
pboard/data/templates/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/master.mak.py View File

@@ -0,0 +1,217 @@
1
+# -*- encoding:utf-8 -*-
2
+from mako import runtime, filters, cache
3
+UNDEFINED = runtime.UNDEFINED
4
+__M_dict_builtin = dict
5
+__M_locals_builtin = locals
6
+_magic_number = 9
7
+_modified_time = 1378734449.111631
8
+_enable_loop = True
9
+_template_filename = u'/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/master.mak'
10
+_template_uri = u'/home/daccorsi/sources/protos/pboard/pboard/pboard/templates/master.mak'
11
+_source_encoding = 'utf-8'
12
+from markupsafe import escape_silent as escape
13
+_exports = ['footer', 'body_class', 'meta', 'title', 'main_menu', 'content_wrapper']
14
+
15
+
16
+def render_body(context,**pageargs):
17
+    __M_caller = context.caller_stack._push_frame()
18
+    try:
19
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
20
+        tg = context.get('tg', UNDEFINED)
21
+        self = context.get('self', UNDEFINED)
22
+        __M_writer = context.writer()
23
+        # SOURCE LINE 1
24
+        __M_writer(u'<!DOCTYPE html>\n<html>\n<head>\n    ')
25
+        # SOURCE LINE 4
26
+        __M_writer(escape(self.meta()))
27
+        __M_writer(u'\n    <title>')
28
+        # SOURCE LINE 5
29
+        __M_writer(escape(self.title()))
30
+        __M_writer(u'</title>\n    <link rel="stylesheet" type="text/css" media="screen" href="')
31
+        # SOURCE LINE 6
32
+        __M_writer(escape(tg.url('/css/bootstrap.min.css')))
33
+        __M_writer(u'" />\n    <link rel="stylesheet" type="text/css" media="screen" href="')
34
+        # SOURCE LINE 7
35
+        __M_writer(escape(tg.url('/css/bootstrap-responsive.min.css')))
36
+        __M_writer(u'" />\n    <link rel="stylesheet" type="text/css" media="screen" href="')
37
+        # SOURCE LINE 8
38
+        __M_writer(escape(tg.url('/css/style.css')))
39
+        __M_writer(u'" />\n    <link rel="stylesheet" type="text/css" media="screen" href="')
40
+        # SOURCE LINE 9
41
+        __M_writer(escape(tg.url('/css/glyphicons.css')))
42
+        __M_writer(u'" />\n\n    <style>\n      /* Wrapper for page content to push down footer */\n      #wrap {\n        min-height: 100%;\n        height: auto !important;\n        height: 100%;\n        /* Negative indent footer by it\'s height */\n        margin: 0 auto -60px;\n      }\n\n      /* Set the fixed height of the footer here */\n      #push,\n      #footer {\n        height: 60px;\n      }\n      #footer {\n        background-color: #f5f5f5;\n      }\n\n      /* Lastly, apply responsive CSS fixes as necessary */\n      @media (max-width: 767px) {\n        #footer {\n          margin-left: -20px;\n          margin-right: -20px;\n          padding-left: 20px;\n          padding-right: 20px;\n        }\n      }\n    </style>\n</head>\n<body class="')
43
+        # SOURCE LINE 41
44
+        __M_writer(escape(self.body_class()))
45
+        __M_writer(u'">\n\n  <div class="container">\n    ')
46
+        # SOURCE LINE 44
47
+        __M_writer(escape(self.main_menu()))
48
+        __M_writer(u'\n    ')
49
+        # SOURCE LINE 45
50
+        __M_writer(escape(self.content_wrapper()))
51
+        __M_writer(u'\n    ')
52
+        # SOURCE LINE 46
53
+        __M_writer(escape(self.footer()))
54
+        __M_writer(u'\n  </div>\n\n  <script src="http://code.jquery.com/jquery.js"></script>\n  <script src="')
55
+        # SOURCE LINE 50
56
+        __M_writer(escape(tg.url('/javascript/bootstrap.min.js')))
57
+        __M_writer(u'"></script>\n\n<!-- WYSIWYG Text editor -->\n<link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css"></link>\n<!--link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.min.css"></link-->\n\n<script src="/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js"></script>\n<script src="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js"></script>\n\n<style>\n#addFolderNode {\n  width: 800px;\n  margin-left: -400px;\n}\n</style>\n\n  \n            <script>\n            $(\'#create_document_save_button\').on(\'click\', function(e){\n              // We don\'t want this to act as a link so cancel the link action\n              e.preventDefault();\n\n              // Find form and submit it\n              $(\'#create_document_form\').submit();\n            });\n            </script>\n\n            <script>\n              $(document).ready(function() {\n                $(\'#data_content\').wysihtml5();\n              });\n            </script>\n</body>\n\n')
58
+        # SOURCE LINE 94
59
+        __M_writer(u'\n\n')
60
+        # SOURCE LINE 96
61
+        __M_writer(u'\n')
62
+        # SOURCE LINE 100
63
+        __M_writer(u'\n\n')
64
+        # SOURCE LINE 102
65
+        __M_writer(u'\n\n')
66
+        # SOURCE LINE 108
67
+        __M_writer(u'\n\n')
68
+        # SOURCE LINE 168
69
+        __M_writer(u'\n\n</html>\n')
70
+        return ''
71
+    finally:
72
+        context.caller_stack._pop_frame()
73
+
74
+
75
+def render_footer(context):
76
+    __M_caller = context.caller_stack._push_frame()
77
+    try:
78
+        h = context.get('h', UNDEFINED)
79
+        __M_writer = context.writer()
80
+        # SOURCE LINE 104
81
+        __M_writer(u'\n  <div class="footer hidden-tablet hidden-phone">\n    <p>Copyright &copy; pod project ')
82
+        # SOURCE LINE 106
83
+        __M_writer(escape(h.current_year()))
84
+        __M_writer(u'</p>\n  </div>\n')
85
+        return ''
86
+    finally:
87
+        context.caller_stack._pop_frame()
88
+
89
+
90
+def render_body_class(context):
91
+    __M_caller = context.caller_stack._push_frame()
92
+    try:
93
+        __M_writer = context.writer()
94
+        return ''
95
+    finally:
96
+        context.caller_stack._pop_frame()
97
+
98
+
99
+def render_meta(context):
100
+    __M_caller = context.caller_stack._push_frame()
101
+    try:
102
+        response = context.get('response', UNDEFINED)
103
+        __M_writer = context.writer()
104
+        # SOURCE LINE 97
105
+        __M_writer(u'\n  <meta charset="')
106
+        # SOURCE LINE 98
107
+        __M_writer(escape(response.charset))
108
+        __M_writer(u'" />\n  <meta name="viewport" content="width=device-width, initial-scale=1.0">\n')
109
+        return ''
110
+    finally:
111
+        context.caller_stack._pop_frame()
112
+
113
+
114
+def render_title(context):
115
+    __M_caller = context.caller_stack._push_frame()
116
+    try:
117
+        __M_writer = context.writer()
118
+        # SOURCE LINE 102
119
+        __M_writer(u'  ')
120
+        return ''
121
+    finally:
122
+        context.caller_stack._pop_frame()
123
+
124
+
125
+def render_main_menu(context):
126
+    __M_caller = context.caller_stack._push_frame()
127
+    try:
128
+        tg = context.get('tg', UNDEFINED)
129
+        request = context.get('request', UNDEFINED)
130
+        page = context.get('page', UNDEFINED)
131
+        __M_writer = context.writer()
132
+        # SOURCE LINE 110
133
+        __M_writer(u'\n  <div class="navbar">\n    <div class="navbar-inner">\n      <div class="container">\n        <a class="brand" href="#"><img src="')
134
+        # SOURCE LINE 114
135
+        __M_writer(escape(tg.url('/img/turbogears_logo.png')))
136
+        __M_writer(u'" alt="TurboGears 2"/> <strong>pod</strong></a>\n        <div class="nav-collapse">\n          <ul class="nav">\n            <li class="active"><a href="')
137
+        # SOURCE LINE 117
138
+        __M_writer(escape(tg.url('/dashboard')))
139
+        __M_writer(u'"><i class="icon-home icon-white"></i> Dashboard</a></li>\n            <li><a href="#">Link</a></li>\n            <li><a href="#">Link</a></li>\n            <li><a href="#">Link</a></li>\n')
140
+        # SOURCE LINE 121
141
+        if request.identity:
142
+            # SOURCE LINE 122
143
+            __M_writer(u'            <li class="dropdown">\n              <a href="#" class="dropdown-toggle" data-toggle="dropdown">Admin <b class="caret"></b></a>\n              <ul class="dropdown-menu">\n                <li class="')
144
+            # SOURCE LINE 125
145
+            __M_writer(escape(('', 'active')[page=='admin']))
146
+            __M_writer(u'"><a href="')
147
+            __M_writer(escape(tg.url('/admin')))
148
+            __M_writer(u'">Manage</a></li>\n                <li class="')
149
+            # SOURCE LINE 126
150
+            __M_writer(escape(('', 'active')[page=='about']))
151
+            __M_writer(u'"><a href="')
152
+            __M_writer(escape(tg.url('/about')))
153
+            __M_writer(u'">About</a></li>\n                <li class="')
154
+            # SOURCE LINE 127
155
+            __M_writer(escape(('', 'active')[page=='data']))
156
+            __M_writer(u'"><a href="')
157
+            __M_writer(escape(tg.url('/data')))
158
+            __M_writer(u'">Serving Data</a></li>\n                <li class="')
159
+            # SOURCE LINE 128
160
+            __M_writer(escape(('', 'active')[page=='environ']))
161
+            __M_writer(u'"><a href="')
162
+            __M_writer(escape(tg.url('/environ')))
163
+            __M_writer(u'">WSGI Environment</a></li>\n              </ul>\n            </li>\n')
164
+        # SOURCE LINE 132
165
+        __M_writer(u'          </ul>\n          <ul class="nav pull-right">\n')
166
+        # SOURCE LINE 134
167
+        if not request.identity:
168
+            # SOURCE LINE 135
169
+            __M_writer(u'              <li class="dropdown">\n                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> Login</a>\n                <ul class="dropdown-menu pull-right">\n                  <li class="text-center">\n                    <form action="')
170
+            # SOURCE LINE 139
171
+            __M_writer(escape(tg.url('/login_handler')))
172
+            __M_writer(u'">\n                      <fieldset>\n                        <legend>Sign in</legend>\n                      <input class="span2" type="text" id="login" name="login" placeholder="email...">\n                      <input class="span2" type="password" id="password" name="password" placeholder="password...">\n                      <div class="span2 control-group">\n                        Remember me <input type="checkbox" id="loginremember" name="remember" value="2252000"/>\n                      </div>\n                      <input type="submit" id="submit" value="Login" />\n                      </fieldset>\n                    </form>\n                   <li class="divider"></li>\n                   <li><a href="">Register</a></li>\n                 </ul>\n              </li>\n')
173
+            # SOURCE LINE 154
174
+        else:
175
+            # SOURCE LINE 155
176
+            __M_writer(u'              <li>\n                <a href="')
177
+            # SOURCE LINE 156
178
+            __M_writer(escape(tg.url('/logout_handler')))
179
+            __M_writer(u'"><i class="icon-off"></i> Logout</a>\n              </li>\n')
180
+        # SOURCE LINE 159
181
+        __M_writer(u'          </ul>\n\n          <form class="navbar-search pull-right" action="">\n            <input type="text" class="search-query span2" placeholder="Search">\n          </form>\n        </div><!-- /.nav-collapse -->\n      </div><!-- /.container -->\n    </div><!-- /.navbar-inner -->\n  </div><!-- /.navbar -->\n')
182
+        return ''
183
+    finally:
184
+        context.caller_stack._pop_frame()
185
+
186
+
187
+def render_content_wrapper(context):
188
+    __M_caller = context.caller_stack._push_frame()
189
+    try:
190
+        tg = context.get('tg', UNDEFINED)
191
+        self = context.get('self', UNDEFINED)
192
+        __M_writer = context.writer()
193
+        # SOURCE LINE 84
194
+        __M_writer(u'\n  ')
195
+        # SOURCE LINE 85
196
+
197
+        flash=tg.flash_obj.render('flash', use_js=False)
198
+          
199
+        
200
+        # SOURCE LINE 87
201
+        __M_writer(u'\n')
202
+        # SOURCE LINE 88
203
+        if flash:
204
+            # SOURCE LINE 89
205
+            __M_writer(u'    <div class="row"><div class="span8 offset2">\n      ')
206
+            # SOURCE LINE 90
207
+            __M_writer(flash )
208
+            __M_writer(u'\n    </div></div>\n')
209
+        # SOURCE LINE 93
210
+        __M_writer(u'  ')
211
+        __M_writer(escape(self.body()))
212
+        __M_writer(u'\n')
213
+        return ''
214
+    finally:
215
+        context.caller_stack._pop_frame()
216
+
217
+

+ 142 - 0
pboard/development.ini View File

@@ -0,0 +1,142 @@
1
+#
2
+# pboard - TurboGears 2 development environment configuration
3
+#
4
+# The %(here)s variable will be replaced with the parent directory of this file
5
+#
6
+# This file is for deployment specific config options -- other configuration
7
+# that is always required for the app is done in the config directory,
8
+# and generally should not be modified by end users.
9
+
10
+[DEFAULT]
11
+debug = true
12
+# Uncomment and replace with the address which should receive any error reports
13
+#email_to = you@yourdomain.com
14
+smtp_server = localhost
15
+error_email_from = turbogears@localhost
16
+
17
+[server:main]
18
+use = egg:gearbox#wsgiref
19
+host = 0.0.0.0
20
+port = 8080
21
+
22
+[sa_auth]
23
+cookie_secret = 3283411b-1904-4554-b0e1-883863b53080
24
+
25
+[app:main]
26
+use = egg:pboard
27
+full_stack = true
28
+#lang = ru
29
+cache_dir = %(here)s/data
30
+beaker.session.key = pboard
31
+beaker.session.secret = 3283411b-1904-4554-b0e1-883863b53080
32
+
33
+#By default session is store in cookies to avoid the overhead
34
+#of having to manage a session storage. On production you might
35
+#want to switch to a better session storage.
36
+beaker.session.type = cookie
37
+beaker.session.validate_key = 3283411b-1904-4554-b0e1-883863b53080
38
+
39
+# Disable template autoreload to boost performances in production
40
+# WARNING: if you want to deploy your application using a zipped egg
41
+# (ie: if your application's setup.py defines zip-safe=True, then you
42
+# MUST put "false" for the production environment because there will
43
+# be no disk and real files to compare time with.
44
+#auto_reload_templates = false
45
+
46
+# If you'd like to fine-tune the individual locations of the cache data dirs
47
+# for the Cache data, or the Session saves, un-comment the desired settings
48
+# here:
49
+#beaker.cache.data_dir = %(here)s/data/cache
50
+#beaker.session.data_dir = %(here)s/data/sessions
51
+
52
+# pick the form for your database
53
+# %(here) may include a ':' character on Windows environments; this can
54
+# invalidate the URI when specifying a SQLite db via path name
55
+# sqlalchemy.url=postgres://username:password@hostname:port/databasename
56
+# sqlalchemy.url=mysql://username:password@hostname:port/databasename
57
+
58
+
59
+# If you have sqlite, here's a simple default to get you started
60
+# in development
61
+
62
+sqlalchemy.url = postgres://pboard:pboard@127.0.0.1:5432/pboarddb
63
+#echo shouldn't be used together with the logging module.
64
+sqlalchemy.echo = false
65
+sqlalchemy.echo_pool = false
66
+sqlalchemy.pool_recycle = 3600
67
+
68
+# This line ensures that Genshi will render xhtml when sending the
69
+# output. Change to html or xml, as desired.
70
+templating.genshi.method = xhtml
71
+templating.genshi.doctype = html5
72
+
73
+# the compiled template dir is a directory that must be readable and writable
74
+# by your webserver. It will be used to store the resulting templates once
75
+# compiled by the TemplateLookup system.
76
+# During development you generally don't need this option since paste's HTTP
77
+# server will have access to you development directories, but in production
78
+# you'll most certainly want to have apache or nginx to write in a directory
79
+# that does not contain any source code in any form for obvious security
80
+# reasons.  If disabled, None, False, or not writable, it will fall back
81
+# to an in-memory cache.
82
+templating.mako.compiled_templates_dir = %(here)s/data/templates
83
+
84
+# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
85
+# Debug mode will enable the interactive debugging tool, allowing ANYONE to
86
+# execute malicious code after an exception is raised.
87
+#set debug = false
88
+
89
+# Logging configuration
90
+# Add additional loggers, handlers, formatters here
91
+# Uses python's logging config file format
92
+# http://docs.python.org/lib/logging-config-fileformat.html
93
+
94
+#turn this setting to "min" if you would like tw to produce minified
95
+#javascript files (if your library supports that)
96
+toscawidgets.framework.resource_variant=debug
97
+
98
+[loggers]
99
+keys = root, pboard, sqlalchemy, auth
100
+
101
+[handlers]
102
+keys = console
103
+
104
+[formatters]
105
+keys = generic
106
+
107
+# If you create additional loggers, add them as a key to [loggers]
108
+[logger_root]
109
+level = INFO
110
+handlers = console
111
+
112
+[logger_pboard]
113
+level = DEBUG
114
+handlers =
115
+qualname = pboard
116
+
117
+[logger_sqlalchemy]
118
+level = INFO
119
+handlers =
120
+qualname = sqlalchemy.engine
121
+# "level = INFO" logs SQL queries.
122
+# "level = DEBUG" logs SQL queries and results.
123
+# "level = WARN" logs neither.  (Recommended for production systems.)
124
+
125
+# A logger for authentication, identification and authorization
126
+# this is repoze.who:
127
+[logger_auth]
128
+level = WARN
129
+handlers =
130
+qualname = auth
131
+
132
+# If you create additional handlers, add them as a key to [handlers]
133
+[handler_console]
134
+class = StreamHandler
135
+args = (sys.stderr,)
136
+level = NOTSET
137
+formatter = generic
138
+
139
+# If you create additional formatters, add them as a key to [formatters]
140
+[formatter_generic]
141
+format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
142
+datefmt = %H:%M:%S

+ 73 - 0
pboard/migration/env.py View File

@@ -0,0 +1,73 @@
1
+from __future__ import with_statement
2
+from alembic import context
3
+from sqlalchemy import engine_from_config, pool
4
+from logging.config import fileConfig
5
+
6
+# this is the Alembic Config object, which provides
7
+# access to the values within the .ini file in use.
8
+config = context.config
9
+
10
+# Interpret the config file for Python logging.
11
+# This line sets up loggers basically.
12
+#fileConfig(config.config_file_name)
13
+
14
+# add your model's MetaData object here
15
+# for 'autogenerate' support
16
+# from myapp import mymodel
17
+# target_metadata = mymodel.Base.metadata
18
+from pboard import model
19
+target_metadata = model.metadata
20
+
21
+# other values from the config, defined by the needs of env.py,
22
+# can be acquired:
23
+# my_important_option = config.get_main_option("my_important_option")
24
+# ... etc.
25
+
26
+def run_migrations_offline():
27
+    """Run migrations in 'offline' mode.
28
+
29
+    This configures the context with just a URL
30
+    and not an Engine, though an Engine is acceptable
31
+    here as well.  By skipping the Engine creation
32
+    we don't even need a DBAPI to be available.
33
+
34
+    Calls to context.execute() here emit the given string to the
35
+    script output.
36
+
37
+    """
38
+    url = config.get_main_option("sqlalchemy.url")
39
+    context.configure(url=url, version_table='migrate_version')
40
+
41
+    with context.begin_transaction():
42
+        context.run_migrations()
43
+
44
+def run_migrations_online():
45
+    """Run migrations in 'online' mode.
46
+
47
+    In this scenario we need to create an Engine
48
+    and associate a connection with the context.
49
+
50
+    """
51
+    engine = engine_from_config(
52
+                config.get_section(config.config_ini_section),
53
+                prefix='sqlalchemy.',
54
+                poolclass=pool.NullPool)
55
+
56
+    connection = engine.connect()
57
+    context.configure(
58
+                connection=connection,
59
+                target_metadata=target_metadata,
60
+                version_table='migrate_version'
61
+                )
62
+
63
+    try:
64
+        with context.begin_transaction():
65
+            context.run_migrations()
66
+    finally:
67
+        connection.close()
68
+
69
+if context.is_offline_mode():
70
+    run_migrations_offline()
71
+else:
72
+    run_migrations_online()
73
+

+ 22 - 0
pboard/migration/script.py.mako View File

@@ -0,0 +1,22 @@
1
+"""${message}
2
+
3
+Revision ID: ${up_revision}
4
+Revises: ${down_revision}
5
+Create Date: ${create_date}
6
+
7
+"""
8
+
9
+# revision identifiers, used by Alembic.
10
+revision = ${repr(up_revision)}
11
+down_revision = ${repr(down_revision)}
12
+
13
+from alembic import op
14
+import sqlalchemy as sa
15
+${imports if imports else ""}
16
+
17
+def upgrade():
18
+    ${upgrades if upgrades else "pass"}
19
+
20
+
21
+def downgrade():
22
+    ${downgrades if downgrades else "pass"}

+ 0 - 0
pboard/migration/versions/empty.txt View File


+ 10 - 0
pboard/pboard.egg-info/PKG-INFO View File

@@ -0,0 +1,10 @@
1
+Metadata-Version: 1.0
2
+Name: pboard
3
+Version: 0.1dev
4
+Summary: UNKNOWN
5
+Home-page: UNKNOWN
6
+Author: UNKNOWN
7
+Author-email: UNKNOWN
8
+License: UNKNOWN
9
+Description: UNKNOWN
10
+Platform: UNKNOWN

+ 58 - 0
pboard/pboard.egg-info/SOURCES.txt View File

@@ -0,0 +1,58 @@
1
+MANIFEST.in
2
+README.txt
3
+setup.cfg
4
+setup.py
5
+pboard/__init__.py
6
+pboard.egg-info/PKG-INFO
7
+pboard.egg-info/SOURCES.txt
8
+pboard.egg-info/dependency_links.txt
9
+pboard.egg-info/entry_points.txt
10
+pboard.egg-info/not-zip-safe
11
+pboard.egg-info/requires.txt
12
+pboard.egg-info/top_level.txt
13
+pboard/config/__init__.py
14
+pboard/config/app_cfg.py
15
+pboard/config/environment.py
16
+pboard/config/middleware.py
17
+pboard/controllers/__init__.py
18
+pboard/controllers/error.py
19
+pboard/controllers/root.py
20
+pboard/controllers/secure.py
21
+pboard/controllers/template.py
22
+pboard/i18n/ru/LC_MESSAGES/pboard.po
23
+pboard/lib/__init__.py
24
+pboard/lib/app_globals.py
25
+pboard/lib/base.py
26
+pboard/lib/helpers.py
27
+pboard/model/__init__.py
28
+pboard/model/auth.py
29
+pboard/public/favicon.ico
30
+pboard/public/css/bootstrap-responsive.min.css
31
+pboard/public/css/bootstrap.min.css
32
+pboard/public/css/style.css
33
+pboard/public/img/glyphicons-halflings-white.png
34
+pboard/public/img/glyphicons-halflings.png
35
+pboard/public/img/turbogears_logo.png
36
+pboard/public/img/turbogears_logo_big.png
37
+pboard/public/img/under_the_hood_blue.png
38
+pboard/public/javascript/bootstrap.min.js
39
+pboard/templates/__init__.py
40
+pboard/templates/__init__.pyc
41
+pboard/templates/about.mak
42
+pboard/templates/data.mak
43
+pboard/templates/environ.mak
44
+pboard/templates/error.mak
45
+pboard/templates/index.mak
46
+pboard/templates/login.mak
47
+pboard/templates/master.html
48
+pboard/templates/master.mak
49
+pboard/templates/simple_mako.mak
50
+pboard/tests/__init__.py
51
+pboard/tests/functional/__init__.py
52
+pboard/tests/functional/test_authentication.py
53
+pboard/tests/functional/test_root.py
54
+pboard/tests/models/__init__.py
55
+pboard/tests/models/test_auth.py
56
+pboard/websetup/__init__.py
57
+pboard/websetup/bootstrap.py
58
+pboard/websetup/schema.py

+ 1 - 0
pboard/pboard.egg-info/dependency_links.txt View File

@@ -0,0 +1 @@
1
+http://tg.gy/230

+ 6 - 0
pboard/pboard.egg-info/entry_points.txt View File

@@ -0,0 +1,6 @@
1
+[paste.app_factory]
2
+main = pboard.config.middleware:make_app
3
+
4
+[gearbox.plugins]
5
+turbogears-devtools = tg.devtools
6
+

+ 1 - 0
pboard/pboard.egg-info/not-zip-safe View File

@@ -0,0 +1 @@
1
+

+ 10 - 0
pboard/pboard.egg-info/requires.txt View File

@@ -0,0 +1,10 @@
1
+TurboGears2 >= 2.3.0b3
2
+Babel
3
+Genshi
4
+Mako
5
+zope.sqlalchemy >= 0.4
6
+sqlalchemy
7
+alembic
8
+repoze.who
9
+tw2.forms
10
+tgext.admin >= 0.5.1

+ 1 - 0
pboard/pboard.egg-info/top_level.txt View File

@@ -0,0 +1 @@
1
+pboard

+ 2 - 0
pboard/pboard/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+"""The pboard package"""

+ 2 - 0
pboard/pboard/config/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+

+ 92 - 0
pboard/pboard/config/app_cfg.py View File

@@ -0,0 +1,92 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Global configuration file for TG2-specific settings in pboard.
4
+
5
+This file complements development/deployment.ini.
6
+
7
+Please note that **all the argument values are strings**. If you want to
8
+convert them into boolean, for example, you should use the
9
+:func:`paste.deploy.converters.asbool` function, as in::
10
+    
11
+    from paste.deploy.converters import asbool
12
+    setting = asbool(global_conf.get('the_setting'))
13
+ 
14
+"""
15
+
16
+from tg.configuration import AppConfig
17
+
18
+import pboard
19
+from pboard import model
20
+from pboard.lib import app_globals, helpers 
21
+
22
+base_config = AppConfig()
23
+base_config.renderers = []
24
+base_config.prefer_toscawidgets2 = True
25
+
26
+base_config.package = pboard
27
+
28
+#Enable json in expose
29
+base_config.renderers.append('json')
30
+#Enable genshi in expose to have a lingua franca for extensions and pluggable apps
31
+#you can remove this if you don't plan to use it.
32
+base_config.renderers.append('genshi')
33
+
34
+#Set the default renderer
35
+base_config.default_renderer = 'mako'
36
+base_config.renderers.append('mako')
37
+#Configure the base SQLALchemy Setup
38
+base_config.use_sqlalchemy = True
39
+base_config.model = pboard.model
40
+base_config.DBSession = pboard.model.DBSession
41
+# Configure the authentication backend
42
+
43
+# YOU MUST CHANGE THIS VALUE IN PRODUCTION TO SECURE YOUR APP 
44
+base_config.sa_auth.cookie_secret = "3283411b-1904-4554-b0e1-883863b53080"
45
+
46
+base_config.auth_backend = 'sqlalchemy'
47
+
48
+# what is the class you want to use to search for users in the database
49
+base_config.sa_auth.user_class = model.User
50
+
51
+from tg.configuration.auth import TGAuthMetadata
52
+
53
+#This tells to TurboGears how to retrieve the data for your user
54
+class ApplicationAuthMetadata(TGAuthMetadata):
55
+    def __init__(self, sa_auth):
56
+        self.sa_auth = sa_auth
57
+    def authenticate(self, environ, identity):
58
+        user = self.sa_auth.dbsession.query(self.sa_auth.user_class).filter_by(email_address=identity['login']).first()
59
+        if user and user.validate_password(identity['password']):
60
+            return identity['login']
61
+    def get_user(self, identity, userid):
62
+        return self.sa_auth.dbsession.query(self.sa_auth.user_class).filter_by(email_address=userid).first()
63
+    def get_groups(self, identity, userid):
64
+        return [g.group_name for g in identity['user'].groups]
65
+    def get_permissions(self, identity, userid):
66
+        return [p.permission_name for p in identity['user'].permissions]
67
+
68
+base_config.sa_auth.dbsession = model.DBSession
69
+
70
+base_config.sa_auth.authmetadata = ApplicationAuthMetadata(base_config.sa_auth)
71
+
72
+# You can use a different repoze.who Authenticator if you want to
73
+# change the way users can login
74
+#base_config.sa_auth.authenticators = [('myauth', SomeAuthenticator()]
75
+
76
+# You can add more repoze.who metadata providers to fetch
77
+# user metadata.
78
+# Remember to set base_config.sa_auth.authmetadata to None
79
+# to disable authmetadata and use only your own metadata providers
80
+#base_config.sa_auth.mdproviders = [('myprovider', SomeMDProvider()]
81
+
82
+# override this if you would like to provide a different who plugin for
83
+# managing login and logout of your application
84
+base_config.sa_auth.form_plugin = None
85
+
86
+# You may optionally define a page where you want users to be redirected to
87
+# on login:
88
+base_config.sa_auth.post_login_url = '/post_login'
89
+
90
+# You may optionally define a page where you want users to be redirected to
91
+# on logout:
92
+base_config.sa_auth.post_logout_url = '/post_logout'

+ 101 - 0
pboard/pboard/config/deployment.ini_tmpl View File

@@ -0,0 +1,101 @@
1
+#
2
+# pboard - TurboGears 2 production environment configuration
3
+#
4
+# The %(here)s variable will be replaced with the parent directory of this file
5
+#
6
+[DEFAULT]
7
+# WARGING == If debug is not set to false, you'll get the interactive
8
+# debugger on production, which is a huge security hole.
9
+
10
+debug = false
11
+email_to = you@yourdomain.com
12
+smtp_server = localhost
13
+error_email_from = turbogears@localhost
14
+
15
+[server:main]
16
+use = egg:gearbox#wsgiref
17
+host = 0.0.0.0
18
+port = 8080
19
+
20
+[sa_auth]
21
+cookie_secret = ${app_instance_secret}
22
+
23
+[app:main]
24
+use = egg:pboard
25
+full_stack = true
26
+cache_dir = %(here)s/data
27
+beaker.session.key = pboard
28
+beaker.session.secret = ${app_instance_secret}
29
+app_instance_uuid = ${app_instance_uuid}
30
+
31
+# If you'd like to fine-tune the individual locations of the cache data dirs
32
+# for the Cache data, or the Session saves, un-comment the desired settings
33
+# here:
34
+#beaker.cache.data_dir = %(here)s/data/cache
35
+#beaker.session.data_dir = %(here)s/data/sessions
36
+# Specify the database for SQLAlchemy to use via
37
+# turbogears.database
38
+# %(here) may include a ':' character on Windows environments; this can
39
+# invalidate the URI when specifying a SQLite db via path name
40
+sqlalchemy.url = sqlite:///%(here)s/somedb.db
41
+sqlalchemy.echo = False
42
+
43
+# This line ensures that Genshi will render xhtml when sending the
44
+# output. Change to html or xml, as desired.
45
+templating.genshi.method = xhtml
46
+
47
+# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
48
+# Debug mode will enable the interactive debugging tool, allowing ANYONE to
49
+# execute malicious code after an exception is raised.
50
+#set debug = false
51
+
52
+# Logging configuration
53
+# Add additional loggers, handlers, formatters here
54
+# Uses python's logging config file format
55
+# http://docs.python.org/lib/logging-config-fileformat.html
56
+
57
+[loggers]
58
+keys = root, pboard, sqlalchemy, auth
59
+
60
+[handlers]
61
+keys = console
62
+
63
+[formatters]
64
+keys = generic
65
+
66
+# If you create additional loggers, add them as a key to [loggers]
67
+[logger_root]
68
+level = INFO
69
+handlers = console
70
+
71
+[logger_pboard]
72
+level = INFO
73
+handlers =
74
+qualname = pboard
75
+
76
+[logger_sqlalchemy]
77
+level = WARN
78
+handlers =
79
+qualname = sqlalchemy.engine
80
+# "level = INFO" logs SQL queries.
81
+# "level = DEBUG" logs SQL queries and results.
82
+# "level = WARN" logs neither.  (Recommended for production systems.)
83
+
84
+# A logger for authentication, identification and authorization
85
+# This is repoze.who:
86
+[logger_auth]
87
+level = WARN
88
+handlers =
89
+qualname = auth
90
+
91
+# If you create additional handlers, add them as a key to [handlers]
92
+[handler_console]
93
+class = StreamHandler
94
+args = (sys.stderr,)
95
+level = NOTSET
96
+formatter = generic
97
+
98
+# If you create additional formatters, add them as a key to [formatters]
99
+[formatter_generic]
100
+format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
101
+datefmt = %Y-%m-%d %H:%M:%S

+ 9 - 0
pboard/pboard/config/environment.py View File

@@ -0,0 +1,9 @@
1
+# -*- coding: utf-8 -*-
2
+"""WSGI environment setup for pboard."""
3
+
4
+from pboard.config.app_cfg import base_config
5
+
6
+__all__ = ['load_environment']
7
+
8
+#Use base_config to setup the environment loader function
9
+load_environment = base_config.make_load_environment()

+ 39 - 0
pboard/pboard/config/middleware.py View File

@@ -0,0 +1,39 @@
1
+# -*- coding: utf-8 -*-
2
+"""WSGI middleware initialization for the pboard application."""
3
+
4
+from pboard.config.app_cfg import base_config
5
+from pboard.config.environment import load_environment
6
+
7
+
8
+__all__ = ['make_app']
9
+
10
+# Use base_config to setup the necessary PasteDeploy application factory. 
11
+# make_base_app will wrap the TG2 app with all the middleware it needs. 
12
+make_base_app = base_config.setup_tg_wsgi_app(load_environment)
13
+
14
+
15
+def make_app(global_conf, full_stack=True, **app_conf):
16
+    """
17
+    Set pboard up with the settings found in the PasteDeploy configuration
18
+    file used.
19
+    
20
+    :param global_conf: The global settings for pboard (those
21
+        defined under the ``[DEFAULT]`` section).
22
+    :type global_conf: dict
23
+    :param full_stack: Should the whole TG2 stack be set up?
24
+    :type full_stack: str or bool
25
+    :return: The pboard application with all the relevant middleware
26
+        loaded.
27
+    
28
+    This is the PasteDeploy factory for the pboard application.
29
+    
30
+    ``app_conf`` contains all the application-specific settings (those defined
31
+    under ``[app:main]``.
32
+    
33
+   
34
+    """
35
+    app = make_base_app(global_conf, full_stack=True, **app_conf)
36
+    
37
+    # Wrap your base TurboGears 2 application with custom middleware here
38
+    
39
+    return app

+ 2 - 0
pboard/pboard/controllers/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+"""Controllers for the pboard application."""

+ 22 - 0
pboard/pboard/controllers/controller.template View File

@@ -0,0 +1,22 @@
1
+# -*- coding: utf-8 -*-
2
+"""Sample controller module"""
3
+
4
+# turbogears imports
5
+from tg import expose
6
+
7
+#from tg import redirect, validate, flash
8
+#from tg.i18n import ugettext as _
9
+#from tg import predicates
10
+
11
+# project specific imports
12
+from pboard.lib.base import BaseController
13
+#from pboard.model import DBSession, metadata
14
+
15
+
16
+class SampleController(BaseController):
17
+    #Uncomment this line if your controller requires an authenticated user
18
+    #allow_only = predicates.not_anonymous()
19
+    
20
+    @expose('pboard.templates.index')
21
+    def index(self):
22
+        return dict(page='index')

+ 30 - 0
pboard/pboard/controllers/error.py View File

@@ -0,0 +1,30 @@
1
+# -*- coding: utf-8 -*-
2
+"""Error controller"""
3
+
4
+from tg import request, expose
5
+
6
+__all__ = ['ErrorController']
7
+
8
+
9
+class ErrorController(object):
10
+    """
11
+    Generates error documents as and when they are required.
12
+
13
+    The ErrorDocuments middleware forwards to ErrorController when error
14
+    related status codes are returned from the application.
15
+
16
+    This behaviour can be altered by changing the parameters to the
17
+    ErrorDocuments middleware in your config/middleware.py file.
18
+    
19
+    """
20
+
21
+    @expose('pboard.templates.error')
22
+    def document(self, *args, **kwargs):
23
+        """Render the error document"""
24
+        resp = request.environ.get('pylons.original_response')
25
+        default_message = ("<p>We're sorry but we weren't able to process "
26
+                           " this request.</p>")
27
+        values = dict(prefix=request.environ.get('SCRIPT_NAME', ''),
28
+                      code=request.params.get('code', resp.status_int),
29
+                      message=request.params.get('message', default_message))
30
+        return values

+ 156 - 0
pboard/pboard/controllers/root.py View File

@@ -0,0 +1,156 @@
1
+# -*- coding: utf-8 -*-
2
+"""Main Controller"""
3
+
4
+from tg import expose, flash, require, url, lurl, request, redirect, tmpl_context
5
+from tg.i18n import ugettext as _, lazy_ugettext as l_
6
+from tg import predicates
7
+from pboard import model
8
+from pboard.controllers.secure import SecureController
9
+from pboard.model import DBSession, metadata
10
+from tgext.admin.tgadminconfig import TGAdminConfig
11
+from tgext.admin.controller import AdminController
12
+
13
+from pboard.lib.base import BaseController
14
+from pboard.controllers.error import ErrorController
15
+
16
+import pboard.model as pbm
17
+from pboard.lib import dbapi as pld
18
+__all__ = ['RootController']
19
+
20
+
21
+class RootController(BaseController):
22
+    """
23
+    The root controller for the pboard application.
24
+
25
+    All the other controllers and WSGI applications should be mounted on this
26
+    controller. For example::
27
+
28
+        panel = ControlPanelController()
29
+        another_app = AnotherWSGIApplication()
30
+
31
+    Keep in mind that WSGI applications shouldn't be mounted directly: They
32
+    must be wrapped around with :class:`tg.controllers.WSGIAppController`.
33
+
34
+    """
35
+    secc = SecureController()
36
+    admin = AdminController(model, DBSession, config_type=TGAdminConfig)
37
+
38
+    error = ErrorController()
39
+
40
+    def _before(self, *args, **kw):
41
+        tmpl_context.project_name = "pboard"
42
+
43
+    @expose('pboard.templates.index')
44
+    def index(self):
45
+        """Handle the front-page."""
46
+        return dict(page='index')
47
+
48
+    @expose('pboard.templates.about')
49
+    def about(self):
50
+        """Handle the 'about' page."""
51
+        return dict(page='about')
52
+
53
+    @expose('pboard.templates.environ')
54
+    def environ(self):
55
+        """This method showcases TG's access to the wsgi environment."""
56
+        return dict(page='environ', environment=request.environ)
57
+
58
+    @expose('pboard.templates.data')
59
+    @expose('json')
60
+    def data(self, **kw):
61
+        """This method showcases how you can use the same controller for a data page and a display page"""
62
+        return dict(page='data', params=kw)
63
+        
64
+    @expose('pboard.templates.iconset')
65
+    def iconset(self, **kw):
66
+        """This method showcases how you can use the same controller for a data page and a display page"""
67
+        return dict(page='data', params=kw)
68
+        
69
+        
70
+    @expose('pboard.templates.index')
71
+    @require(predicates.has_permission('manage', msg=l_('Only for managers')))
72
+    def manage_permission_only(self, **kw):
73
+        """Illustrate how a page for managers only works."""
74
+        return dict(page='managers stuff')
75
+
76
+    @expose('pboard.templates.index')
77
+    @require(predicates.is_user('editor', msg=l_('Only for the editor')))
78
+    def editor_user_only(self, **kw):
79
+        """Illustrate how a page exclusive for the editor works."""
80
+        return dict(page='editor stuff')
81
+
82
+    @expose('pboard.templates.login')
83
+    def login(self, came_from=lurl('/')):
84
+        """Start the user login."""
85
+        login_counter = request.environ.get('repoze.who.logins', 0)
86
+        if login_counter > 0:
87
+            flash(_('Wrong credentials'), 'warning')
88
+        return dict(page='login', login_counter=str(login_counter),
89
+                    came_from=came_from)
90
+
91
+    @expose()
92
+    def post_login(self, came_from=lurl('/')):
93
+        """
94
+        Redirect the user to the initially requested page on successful
95
+        authentication or redirect her back to the login page if login failed.
96
+
97
+        """
98
+        if not request.identity:
99
+            login_counter = request.environ.get('repoze.who.logins', 0) + 1
100
+            redirect('/login',
101
+                params=dict(came_from=came_from, __logins=login_counter))
102
+        userid = request.identity['repoze.who.userid']
103
+        flash(_('Welcome back, %s!') % userid)
104
+        redirect(came_from)
105
+
106
+    @expose()
107
+    def post_logout(self, came_from=lurl('/')):
108
+        """
109
+        Redirect the user to the initially requested page on logout and say
110
+        goodbye as well.
111
+
112
+        """
113
+        flash(_('We hope to see you soon!'))
114
+        redirect(came_from)
115
+        
116
+    @expose('pboard.templates.dashboard')
117
+    def dashboard(self, node=0, came_from=lurl('/')):
118
+        """show the user dashboard"""
119
+        import pboard.model.data as pbmd
120
+        loRootNodeList = pbm.DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.parent_id==None).order_by(pbmd.PBNode.node_order).all()
121
+        liNodeId = max(int(node), 1)
122
+        print "{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}", liNodeId
123
+        # liNodeId = 5
124
+        loCurrentNode = pbm.DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.node_id==liNodeId).one()
125
+        return dict(root_node_list=loRootNodeList, current_node=loCurrentNode)
126
+
127
+    @expose()
128
+    def move_node_upper(self, node_id=0, came_from=lurl('/dashboard')):
129
+      loNode = pld.getNode(node_id)
130
+      pld.moveNodeUpper(loNode)
131
+      redirect(came_from)
132
+
133
+    @expose()
134
+    def move_node_lower(self, node_id=0, came_from=lurl('/dashboard')):
135
+      loNode = pld.getNode(node_id)
136
+      pld.moveNodeLower(loNode)
137
+      redirect(came_from)
138
+
139
+    @expose()
140
+    def create_document(self, data_label='', parent_id=None, data_content='', came_from=lurl('/dashboard'), **kw):
141
+      loNewNode = pld.createNode()
142
+      loNewNode.data_label   = data_label
143
+      loNewNode.data_content = data_content
144
+      if int(parent_id)==0:
145
+        loNewNode.parent_id = None
146
+      else:
147
+        loNewNode.parent_id = parent_id
148
+      print "PARENT ID IS NONE? ", parent_id==None  #FIXME
149
+      print "PARENT ID IS ZERO? ", parent_id==0     #FIXME
150
+      print "PARENT ID IS 'ZERO'? ", parent_id=='0' #FIXME
151
+      print "PARENT ID IS EMPTY? ", parent_id==''   #FIXME
152
+      #loNewNode.node_id
153
+      #pld.getNode(node_id)
154
+      #pld.moveNodeLower(loNode)
155
+      redirect(came_from)
156
+

+ 27 - 0
pboard/pboard/controllers/secure.py View File

@@ -0,0 +1,27 @@
1
+# -*- coding: utf-8 -*-
2
+"""Sample controller with all its actions protected."""
3
+from tg import expose, flash
4
+from tg.i18n import ugettext as _, lazy_ugettext as l_
5
+from tg.predicates import has_permission
6
+
7
+from pboard.lib.base import BaseController
8
+
9
+__all__ = ['SecureController']
10
+
11
+class SecureController(BaseController):
12
+    """Sample controller-wide authorization"""
13
+    
14
+    # The predicate that must be met for all the actions in this controller:
15
+    allow_only = has_permission('manage',
16
+                                msg=l_('Only for people with the "manage" permission'))
17
+    
18
+    @expose('pboard.templates.index')
19
+    def index(self):
20
+        """Let the user know that's visiting a protected controller."""
21
+        flash(_("Secure Controller here"))
22
+        return dict(page='index')
23
+    
24
+    @expose('pboard.templates.index')
25
+    def some_where(self):
26
+        """Let the user know that this action is protected too."""
27
+        return dict(page='some_where')

+ 36 - 0
pboard/pboard/controllers/template.py View File

@@ -0,0 +1,36 @@
1
+# -*- coding: utf-8 -*-
2
+"""Fallback controller."""
3
+
4
+from pboard.lib.base import BaseController
5
+from tg import abort
6
+
7
+__all__ = ['TemplateController']
8
+
9
+
10
+class TemplateController(BaseController):
11
+    """
12
+    The fallback controller for pboard.
13
+    
14
+    By default, the final controller tried to fulfill the request
15
+    when no other routes match. It may be used to display a template
16
+    when all else fails, e.g.::
17
+    
18
+        def view(self, url):
19
+            return render('/%s' % url)
20
+    
21
+    Or if you're using Mako and want to explicitly send a 404 (Not
22
+    Found) response code when the requested template doesn't exist::
23
+    
24
+        import mako.exceptions
25
+        
26
+        def view(self, url):
27
+            try:
28
+                return render('/%s' % url)
29
+            except mako.exceptions.TopLevelLookupException:
30
+                abort(404)
31
+    
32
+    """
33
+    
34
+    def view(self, url):
35
+        """Abort the request with a 404 HTTP status code."""
36
+        abort(404)

+ 24 - 0
pboard/pboard/i18n/ru/LC_MESSAGES/pboard.po View File

@@ -0,0 +1,24 @@
1
+# Russian translations for ${package}.
2
+# Copyright (C) 2008 ORGANIZATION
3
+# This file is distributed under the same license as the ${package} project.
4
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
5
+#
6
+msgid ""
7
+msgstr ""
8
+"Project-Id-Version: ${package} 0.0.0\n"
9
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
+"POT-Creation-Date: 2008-01-13 14:00+0200\n"
11
+"PO-Revision-Date: 2008-01-13 14:00+0200\n"
12
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+"Language-Team: ru <LL@li.org>\n"
14
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
15
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
16
+"MIME-Version: 1.0\n"
17
+"Content-Type: text/plain; charset=utf-8\n"
18
+"Content-Transfer-Encoding: 8bit\n"
19
+"Generated-By: Babel 0.9.1\n"
20
+
21
+#: ${package}/controllers/root.py:13
22
+msgid "Your application is now running"
23
+msgstr "Ваши приложение успешно запущено"
24
+

+ 2 - 0
pboard/pboard/lib/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+

+ 18 - 0
pboard/pboard/lib/app_globals.py View File

@@ -0,0 +1,18 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+"""The application's Globals object"""
4
+
5
+__all__ = ['Globals']
6
+
7
+
8
+class Globals(object):
9
+    """Container for objects available throughout the life of the application.
10
+
11
+    One instance of Globals is created during application initialization and
12
+    is available during requests via the 'app_globals' variable.
13
+
14
+    """
15
+
16
+    def __init__(self):
17
+        """Do nothing, by default."""
18
+        pass

+ 30 - 0
pboard/pboard/lib/base.py View File

@@ -0,0 +1,30 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+"""The base Controller API."""
4
+
5
+from tg import TGController, tmpl_context
6
+from tg.render import render
7
+from tg import request
8
+from tg.i18n import ugettext as _, ungettext
9
+import pboard.model as model
10
+
11
+__all__ = ['BaseController']
12
+
13
+
14
+class BaseController(TGController):
15
+    """
16
+    Base class for the controllers in the application.
17
+
18
+    Your web application should have one of these. The root of
19
+    your application is used to compute URLs used by your app.
20
+
21
+    """
22
+
23
+    def __call__(self, environ, context):
24
+        """Invoke the Controller"""
25
+        # TGController.__call__ dispatches to the Controller method
26
+        # the request is routed to.
27
+
28
+        request.identity = request.environ.get('repoze.who.identity')
29
+        tmpl_context.identity = request.identity
30
+        return TGController.__call__(self, environ, context)

+ 80 - 0
pboard/pboard/lib/dbapi.py View File

@@ -0,0 +1,80 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+"""
4
+import os
5
+from datetime import datetime
6
+from hashlib import sha256
7
+__all__ = ['User', 'Group', 'Permission']
8
+
9
+from sqlalchemy import Table, ForeignKey, Column
10
+from sqlalchemy.types import Unicode, Integer, DateTime, Text
11
+from sqlalchemy.orm import relation, synonym
12
+
13
+from pboard.model import DeclarativeBase, metadata, DBSession
14
+from pboard.model import data as pbmd
15
+
16
+def createNode():
17
+  loNode = pbmd.PBNode()
18
+  DBSession.add(loNode)
19
+  return loNode
20
+
21
+def getNode(liNodeId):
22
+  return DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.node_id==liNodeId).one()
23
+
24
+def getParentNode(loNode):
25
+  return DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.node_id==loNode.parent_id).one()
26
+
27
+def getSiblingNodes(poNode, pbReverseOrder=False):
28
+  if pbReverseOrder:
29
+    return DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.parent_id==poNode.parent_id).order_by(pbmd.PBNode.node_order.desc()).all()
30
+  else:
31
+    return DBSession.query(pbmd.PBNode).filter(pbmd.PBNode.parent_id==poNode.parent_id).order_by(pbmd.PBNode.node_order).all()
32
+
33
+def resetNodeOrderOfSiblingNodes(loSiblingNodes):
34
+  liNewWeight = 0
35
+  for loNode in loSiblingNodes:
36
+    liNewWeight = liNewWeight + 1
37
+    loNode.node_order = liNewWeight
38
+  # DBSession.save()
39
+  
40
+
41
+def moveNodeUpper(loNode):
42
+  # FIXME - manage errors and logging
43
+  
44
+  loSiblingNodes = getSiblingNodes(loNode)
45
+  resetNodeOrderOfSiblingNodes(loSiblingNodes)
46
+
47
+  loPreviousItem = None
48
+  for loItem in loSiblingNodes:
49
+    if loItem==loNode:
50
+      if loPreviousItem==None:
51
+        # FIXME
52
+        print "No previous node"
53
+      else:
54
+        liPreviousItemOrder       = loPreviousItem.node_order
55
+        loPreviousItem.node_order = loNode.node_order
56
+        loNode.node_order         = liPreviousItemOrder
57
+        # DBSession.save()
58
+        break
59
+    loPreviousItem = loItem
60
+
61
+def moveNodeLower(loNode):
62
+  # FIXME - manage errors and logging
63
+  
64
+  loSiblingNodes = getSiblingNodes(loNode)
65
+  resetNodeOrderOfSiblingNodes(loSiblingNodes)
66
+
67
+  loPreviousItem = None
68
+  for loItem in reversed(loSiblingNodes):
69
+    if loItem==loNode:
70
+      if loPreviousItem==None:
71
+        # FIXME
72
+        print "No previous node"
73
+      else:
74
+        liPreviousItemOrder       = loPreviousItem.node_order
75
+        loPreviousItem.node_order = loNode.node_order
76
+        loNode.node_order         = liPreviousItemOrder
77
+        # DBSession.save()
78
+        break
79
+    loPreviousItem = loItem
80
+

+ 17 - 0
pboard/pboard/lib/helpers.py View File

@@ -0,0 +1,17 @@
1
+# -*- coding: utf-8 -*-
2
+
3
+"""WebHelpers used in pboard."""
4
+
5
+#from webhelpers import date, feedgenerator, html, number, misc, text
6
+from markupsafe import Markup
7
+from datetime import datetime
8
+
9
+def current_year():
10
+  now = datetime.now()
11
+  return now.strftime('%Y')
12
+
13
+def icon(icon_name, white=False):
14
+    if (white):
15
+        return Markup('<i class="icon-%s icon-white"></i>' % icon_name)
16
+    else:
17
+        return Markup('<i class="icon-%s"></i>' % icon_name)

+ 63 - 0
pboard/pboard/model/__init__.py View File

@@ -0,0 +1,63 @@
1
+# -*- coding: utf-8 -*-
2
+"""The application's model objects"""
3
+
4
+from zope.sqlalchemy import ZopeTransactionExtension
5
+from sqlalchemy.orm import scoped_session, sessionmaker
6
+#from sqlalchemy import MetaData
7
+from sqlalchemy.ext.declarative import declarative_base
8
+
9
+# Global session manager: DBSession() returns the Thread-local
10
+# session object appropriate for the current web request.
11
+maker = sessionmaker(autoflush=True, autocommit=False,
12
+                     extension=ZopeTransactionExtension())
13
+DBSession = scoped_session(maker)
14
+
15
+# Base class for all of our model classes: By default, the data model is
16
+# defined with SQLAlchemy's declarative extension, but if you need more
17
+# control, you can switch to the traditional method.
18
+DeclarativeBase = declarative_base()
19
+
20
+# There are two convenient ways for you to spare some typing.
21
+# You can have a query property on all your model classes by doing this:
22
+# DeclarativeBase.query = DBSession.query_property()
23
+# Or you can use a session-aware mapper as it was used in TurboGears 1:
24
+# DeclarativeBase = declarative_base(mapper=DBSession.mapper)
25
+
26
+# Global metadata.
27
+# The default metadata is the one from the declarative base.
28
+metadata = DeclarativeBase.metadata
29
+
30
+# If you have multiple databases with overlapping table names, you'll need a
31
+# metadata for each database. Feel free to rename 'metadata2'.
32
+#metadata2 = MetaData()
33
+
34
+#####
35
+# Generally you will not want to define your table's mappers, and data objects
36
+# here in __init__ but will want to create modules them in the model directory
37
+# and import them at the bottom of this file.
38
+#
39
+######
40
+
41
+def init_model(engine):
42
+    """Call me before using any of the tables or classes in the model."""
43
+    DBSession.configure(bind=engine)
44
+
45
+    # If you are using reflection to introspect your database and create
46
+    # table objects for you, your tables must be defined and mapped inside
47
+    # the init_model function, so that the engine is available if you
48
+    # use the model outside tg2, you need to make sure this is called before
49
+    # you use the model.
50
+
51
+    #
52
+    # See the following example:
53
+
54
+    #global t_reflected
55
+
56
+    #t_reflected = Table("Reflected", metadata,
57
+    #    autoload=True, autoload_with=engine)
58
+
59
+    #mapper(Reflected, t_reflected)
60
+
61
+# Import your model modules here.
62
+from pboard.model.auth import User, Group, Permission
63
+from pboard.model.data import PBNode

+ 172 - 0
pboard/pboard/model/auth.py View File

@@ -0,0 +1,172 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Auth* related model.
4
+
5
+This is where the models used by the authentication stack are defined.
6
+
7
+It's perfectly fine to re-use this definition in the pboard application,
8
+though.
9
+
10
+"""
11
+import os
12
+from datetime import datetime
13
+from hashlib import sha256
14
+__all__ = ['User', 'Group', 'Permission']
15
+
16
+from sqlalchemy import Table, ForeignKey, Column
17
+from sqlalchemy.types import Unicode, Integer, DateTime
18
+from sqlalchemy.orm import relation, synonym
19
+
20
+from pboard.model import DeclarativeBase, metadata, DBSession
21
+
22
+# This is the association table for the many-to-many relationship between
23
+# groups and permissions.
24
+group_permission_table = Table('tg_group_permission', metadata,
25
+    Column('group_id', Integer, ForeignKey('tg_group.group_id',
26
+        onupdate="CASCADE", ondelete="CASCADE"), primary_key=True),
27
+    Column('permission_id', Integer, ForeignKey('tg_permission.permission_id',
28
+        onupdate="CASCADE", ondelete="CASCADE"), primary_key=True)
29
+)
30
+
31
+# This is the association table for the many-to-many relationship between
32
+# groups and members - this is, the memberships.
33
+user_group_table = Table('tg_user_group', metadata,
34
+    Column('user_id', Integer, ForeignKey('tg_user.user_id',
35
+        onupdate="CASCADE", ondelete="CASCADE"), primary_key=True),
36
+    Column('group_id', Integer, ForeignKey('tg_group.group_id',
37
+        onupdate="CASCADE", ondelete="CASCADE"), primary_key=True)
38
+)
39
+
40
+
41
+class Group(DeclarativeBase):
42
+    """
43
+    Group definition
44
+
45
+    Only the ``group_name`` column is required.
46
+
47
+    """
48
+
49
+    __tablename__ = 'tg_group'
50
+
51
+    group_id = Column(Integer, autoincrement=True, primary_key=True)
52
+    group_name = Column(Unicode(16), unique=True, nullable=False)
53
+    display_name = Column(Unicode(255))
54
+    created = Column(DateTime, default=datetime.now)
55
+    users = relation('User', secondary=user_group_table, backref='groups')
56
+
57
+    def __repr__(self):
58
+        return '<Group: name=%s>' % repr(self.group_name)
59
+
60
+    def __unicode__(self):
61
+        return self.group_name
62
+
63
+class User(DeclarativeBase):
64
+    """
65
+    User definition.
66
+
67
+    This is the user definition used by :mod:`repoze.who`, which requires at
68
+    least the ``email_address`` column.
69
+
70
+    """
71
+    __tablename__ = 'tg_user'
72
+
73
+    user_id = Column(Integer, autoincrement=True, primary_key=True)
74
+    email_address = Column(Unicode(255), unique=True, nullable=False)
75
+    display_name = Column(Unicode(255))
76
+    _password = Column('password', Unicode(128))
77
+    created = Column(DateTime, default=datetime.now)
78
+
79
+    def __repr__(self):
80
+        return '<User: email=%s, display=%s>' % (
81
+                repr(self.email_address), repr(self.display_name))
82
+
83
+    def __unicode__(self):
84
+        return self.display_name or self.email_address
85
+
86
+    @property
87
+    def permissions(self):
88
+        """Return a set with all permissions granted to the user."""
89
+        perms = set()
90
+        for g in self.groups:
91
+            perms = perms | set(g.permissions)
92
+        return perms
93
+
94
+    @classmethod
95
+    def by_email_address(cls, email):
96
+        """Return the user object whose email address is ``email``."""
97
+        return DBSession.query(cls).filter_by(email_address=email).first()
98
+
99
+    @classmethod
100
+    def by_user_name(cls, username):
101
+        """Return the user object whose user name is ``username``."""
102
+        return DBSession.query(cls).filter_by(email_address=username).first()
103
+
104
+    @classmethod
105
+    def _hash_password(cls, password):
106
+        salt = sha256()
107
+        salt.update(os.urandom(60))
108
+        salt = salt.hexdigest()
109
+
110
+        hash = sha256()
111
+        # Make sure password is a str because we cannot hash unicode objects
112
+        hash.update((password + salt).encode('utf-8'))
113
+        hash = hash.hexdigest()
114
+
115
+        password = salt + hash
116
+
117
+        # Make sure the hashed password is a unicode object at the end of the
118
+        # process because SQLAlchemy _wants_ unicode objects for Unicode cols
119
+        password = password.decode('utf-8')
120
+
121
+        return password
122
+
123
+    def _set_password(self, password):
124
+        """Hash ``password`` on the fly and store its hashed version."""
125
+        self._password = self._hash_password(password)
126
+
127
+    def _get_password(self):
128
+        """Return the hashed version of the password."""
129
+        return self._password
130
+
131
+    password = synonym('_password', descriptor=property(_get_password,
132
+                                                        _set_password))
133
+
134
+    def validate_password(self, password):
135
+        """
136
+        Check the password against existing credentials.
137
+
138
+        :param password: the password that was provided by the user to
139
+            try and authenticate. This is the clear text version that we will
140
+            need to match against the hashed one in the database.
141
+        :type password: unicode object.
142
+        :return: Whether the password is valid.
143
+        :rtype: bool
144
+
145
+        """
146
+        hash = sha256()
147
+        hash.update((password + self.password[:64]).encode('utf-8'))
148
+        return self.password[64:] == hash.hexdigest()
149
+
150
+class Permission(DeclarativeBase):
151
+    """
152
+    Permission definition.
153
+
154
+    Only the ``permission_name`` column is required.
155
+
156
+    """
157
+
158
+    __tablename__ = 'tg_permission'
159
+
160
+
161
+    permission_id = Column(Integer, autoincrement=True, primary_key=True)
162
+    permission_name = Column(Unicode(63), unique=True, nullable=False)
163
+    description = Column(Unicode(255))
164
+
165
+    groups = relation(Group, secondary=group_permission_table,
166
+                      backref='permissions')
167
+
168
+    def __repr__(self):
169
+        return '<Permission: name=%s>' % repr(self.permission_name)
170
+
171
+    def __unicode__(self):
172
+        return self.permission_name

+ 117 - 0
pboard/pboard/model/data.py View File

@@ -0,0 +1,117 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+"""
4
+import os
5
+from datetime import datetime
6
+from hashlib import sha256
7
+__all__ = ['User', 'Group', 'Permission']
8
+
9
+from sqlalchemy import Table, ForeignKey, Column, Sequence
10
+from sqlalchemy.types import Unicode, Integer, DateTime, Text
11
+from sqlalchemy.orm import relation, synonym
12
+
13
+from pboard.model import DeclarativeBase, metadata, DBSession
14
+
15
+# This is the association table for the many-to-many relationship between
16
+# groups and permissions.
17
+pb_node_table = Table('pb_nodes', metadata,
18
+    Column('node_id', Integer, Sequence('pb_nodes__node_id__sequence'), primary_key=True),
19
+    Column('parent_id', Integer, ForeignKey('pb_nodes.node_id'), nullable=True, default=None),
20
+    Column('node_order', Integer, nullable=True, default=1),
21
+    Column('node_type', Unicode(16), unique=False, nullable=False, default=u'data'),
22
+
23
+    Column('created_at', DateTime, unique=False, nullable=False),
24
+    Column('updated_at', DateTime, unique=False, nullable=False),
25
+
26
+    Column('data_label',   Unicode(1024), unique=False, nullable=False, default=u''),
27
+    Column('data_content', Text(), unique=False, nullable=False, default=u''),
28
+    Column('data_datetime', DateTime, unique=False, nullable=False),
29
+)
30
+"""
31
+- node_type
32
+
33
+- node_created_at
34
+- node_updated_at
35
+
36
+- data_label
37
+- data_content
38
+- data_source_url
39
+- data_status_id
40
+"""
41
+
42
+class PBNodeType(object):
43
+  Node    = 'node'
44
+  Folder  = 'folder'
45
+  Data    = 'data'
46
+  File    = 'file'
47
+  Event   = 'event'
48
+  Contact = 'contact'
49
+  Comment = 'comment'
50
+
51
+
52
+class PBNode(object):
53
+
54
+  def getChildrenOfType(self, plNodeTypeList, plSortingCriteria):
55
+    """return all children nodes of type 'data' or 'node' or 'folder'"""
56
+    print "NODE = ", self.node_id
57
+    print "######"
58
+    print plNodeTypeList
59
+    print "######"
60
+    print "######"
61
+    
62
+    return DBSession.query(PBNode).filter(PBNode.parent_id==self.node_id).filter(PBNode.node_type.in_(plNodeTypeList)).order_by(plSortingCriteria).all()
63
+  
64
+  
65
+  def getChildNb(self):
66
+    liChildNb = DBSession.query(PBNode).filter(PBNode.parent_id==self.node_id).filter(PBNode.node_type==PBNodeType.Data).count()
67
+    print "CHILDREN of ", self.node_id, " are ", liChildNb
68
+    return liChildNb
69
+
70
+  def getChildren(self):
71
+    """return all children nodes of type 'data' or 'node' or 'folder'"""
72
+    return self.getChildrenOfType([PBNodeType.Node, PBNodeType.Folder, PBNodeType.Data], PBNode.node_order.asc())
73
+
74
+  def getContacts(self):
75
+    """return all children nodes of type 'data' or 'node' or 'folder'"""
76
+    return self.getChildrenOfType([PBNodeType.Contact], PBNode.data_label.asc())
77
+
78
+  def getEvents(self):
79
+    """print "---------------------------"
80
+    print self.getChildrenOfType((PBNodeType.Event,), PBNode.data_datetime.desc())
81
+    print "---------------------------"
82
+    print "---------------------------"
83
+    return self.getChildrenOfType((PBNodeType.Event,), PBNode.data_datetime.desc())
84
+    """
85
+    return DBSession.query(PBNode).filter(PBNode.parent_id==self.node_id).filter(PBNode.node_type==PBNodeType.Event).order_by(PBNode.data_datetime.desc()).all()
86
+    return []
87
+    
88
+  def getIconClass(self):
89
+    laIconClass = dict()
90
+    laIconClass['node']   = 'icon-g-folder-open'
91
+    laIconClass['folder'] = 'icon-g-folder-open'
92
+    laIconClass['data']   = 'icon-g-file'
93
+
94
+    laIconClass['file']   = 'icon-file'
95
+    laIconClass['event']  = 'icon-time' # icon-calendar
96
+    laIconClass['contact'] = 'icon-user'
97
+    laIconClass['comment'] = 'icon-comment'
98
+
99
+    if self.node_type==PBNodeType.Data and self.getChildNb()>0:
100
+      return laIconClass['folder']
101
+    else:
102
+      return laIconClass[self.node_type]
103
+      
104
+      
105
+  def getFormattedDateTime(self, poDateTime, psDateTimeFormat = '%d/%m/%Y @ %H:%M'):
106
+    return poDateTime.strftime(psDateTimeFormat)
107
+
108
+  def getFormattedDate(self, poDateTime, psDateTimeFormat = '%d/%m/%Y'):
109
+    return poDateTime.strftime(psDateTimeFormat)
110
+
111
+  def getFormattedTime(self, poDateTime, psDateTimeFormat = '%H:%M'):
112
+    return poDateTime.strftime(psDateTimeFormat)
113
+
114
+
115
+from sqlalchemy.orm import mapper
116
+mapper(PBNode, pb_node_table)
117
+

+ 22 - 0
pboard/pboard/model/model.template View File

@@ -0,0 +1,22 @@
1
+# -*- coding: utf-8 -*-
2
+"""Sample model module."""
3
+
4
+from sqlalchemy import *
5
+from sqlalchemy.orm import mapper, relation
6
+from sqlalchemy import Table, ForeignKey, Column
7
+from sqlalchemy.types import Integer, Unicode
8
+#from sqlalchemy.orm import relation, backref
9
+
10
+from pboard.model import DeclarativeBase, metadata, DBSession
11
+
12
+
13
+class SampleModel(DeclarativeBase):
14
+    __tablename__ = 'sample_model'
15
+    
16
+    #{ Columns
17
+    
18
+    id = Column(Integer, primary_key=True)
19
+    
20
+    data = Column(Unicode(255), nullable=False)
21
+    
22
+    #}

BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/.DS_Store View File


+ 44 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css View File

@@ -0,0 +1,44 @@
1
+ul.wysihtml5-toolbar {
2
+	margin: 0;
3
+	padding: 0;
4
+	display: block;
5
+}
6
+
7
+ul.wysihtml5-toolbar::after {
8
+	clear: both;
9
+	display: table;
10
+	content: "";
11
+}
12
+
13
+ul.wysihtml5-toolbar > li {
14
+	float: left;
15
+	display: list-item;
16
+	list-style: none;
17
+	margin: 0 5px 10px 0;
18
+}
19
+
20
+ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
21
+	font-weight: bold;
22
+}
23
+
24
+ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
25
+	font-style: italic;
26
+}
27
+
28
+ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
29
+	text-decoration: underline;
30
+}
31
+
32
+ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
33
+	background-image: none;
34
+	-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
35
+	-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
36
+	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
37
+	background-color: #E6E6E6;
38
+	background-color: #D9D9D9 9;
39
+	outline: 0;
40
+}
41
+
42
+ul.wysihtml5-commands-disabled .dropdown-menu {
43
+	display: none !important;
44
+}

+ 299 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js View File

@@ -0,0 +1,299 @@
1
+!function($, wysi) {
2
+	"use strict"
3
+	
4
+	var templates = {
5
+		"font-styles": "<li class='dropdown'>" +
6
+							"<a class='btn dropdown-toggle' data-toggle='dropdown' href='#'>" +
7
+								"<i class='icon-g-font'></i>&nbsp;<span class='current-font'>Normal text</span>&nbsp;<b class='caret'></b>" +
8
+							"</a>" +
9
+						    "<ul class='dropdown-menu'>" +
10
+						      	"<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='div'>Normal text</a></li>" +
11
+					            "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h1'>Heading 1</a></li>" +
12
+					            "<li><a data-wysihtml5-command='formatBlock' data-wysihtml5-command-value='h2'>Heading 2</a></li>" +
13
+						    "</ul>" +
14
+						"</li>",
15
+		"emphasis":     "<li>" +
16
+							"<div class='btn-group'>" 
17
+							    + "<a class='btn' data-wysihtml5-command='bold' title='CTRL+B'>Bold</a>" 
18
+							    + "<a class='btn' data-wysihtml5-command='italic' title='CTRL+I'>Italic</a>" 
19
+							    //,+ "<a class='btn' data-wysihtml5-command='underline' title='CTRL+U'>Underline</a>" 
20
+							+ "</div>" 
21
+						+ "</li>",
22
+		"lists": 	"<li>" 
23
+						+ "<div class='btn-group'>" 
24
+					    	+ "<a class='btn' data-wysihtml5-command='insertUnorderedList' title='Unordered List'><i class='icon-g-list'></i></a>" 
25
+						    + "<a class='btn' data-wysihtml5-command='insertOrderedList' title='Ordered List'><i class=' icon-g-show-thumbnails-with-lines'></i></a>" 
26
+						    + "<a class='btn' data-wysihtml5-command='Outdent' title='Outdent'><i class='icon-g-right-indent'></i></a>"  							    
27
+						    + "<a class='btn' data-wysihtml5-command='Indent' title='Indent'><i class='icon-g-left-indent'></i></a>" 
28
+						+ "</div>" 
29
+					+ "</li>",
30
+
31
+		"link": 	"<li>" 
32
+						
33
+						+ "<div class='bootstrap-wysihtml5-insert-link-modal modal hide fade'>"
34
+							+ "<div class='modal-header'>"
35
+							+ "<a class='close' data-dismiss='modal'>×</a>"
36
+							  + "<h3>Insert Link</h3>"
37
+							+ "</div>"
38
+							+ "<div class='modal-body'>"
39
+							  + "<input value='http://' class='bootstrap-wysihtml5-insert-link-url input-xlarge'>"
40
+							+ "</div>"
41
+							+ "<div class='modal-footer'>"
42
+							  + "<a href='#' class='btn' data-dismiss='modal'>Cancel</a>"
43
+							  + "<a href='#' class='btn btn-primary' data-dismiss='modal'>Insert link</a>"
44
+							+ "</div>"
45
+						+ "</div>"
46
+
47
+				    	+ "<a class='btn' data-wysihtml5-command='createLink' title='Link'><i class='icon-g-link'></i></a>" 
48
+
49
+					+ "</li>",
50
+
51
+			"image": "<li>" 
52
+						
53
+						+ "<div class='bootstrap-wysihtml5-insert-image-modal modal hide fade'>"
54
+							+ "<div class='modal-header'>"
55
+							+ "<a class='close' data-dismiss='modal'>×</a>"
56
+							  + "<h3>Insert Image</h3>"
57
+							+ "</div>"
58
+							+ "<div class='modal-body'>"
59
+							  + "<input value='http://' class='bootstrap-wysihtml5-insert-image-url input-xlarge'>"
60
+							+ "</div>"
61
+							+ "<div class='modal-footer'>"
62
+							  + "<a href='#' class='btn' data-dismiss='modal'>Cancel</a>"
63
+							  + "<a href='#' class='btn btn-primary' data-dismiss='modal'>Insert image</a>"
64
+							+ "</div>"
65
+						+ "</div>"
66
+
67
+						+ "<a class='btn' data-wysihtml5-command='insertImage' title='Insert image'><i class='icon-g-picture'></i></a>" 
68
+
69
+					+ "</li>",
70
+
71
+		"html": 
72
+						"<li>"
73
+							+ "<div class='btn-group'>"
74
+								+ "<a class='btn' data-wysihtml5-action='change_view' title='Edit HTML'><i class='icon-g-pencil'></i></a>" 
75
+							+ "</div>"
76
+						+ "</li>"
77
+	};
78
+	
79
+	var defaultOptions = {
80
+		"font-styles": true,
81
+		"emphasis": true,
82
+		"lists": true,
83
+		"html": false,
84
+		"link": true,
85
+		"image": true,
86
+		events: {},
87
+		parserRules: {
88
+			tags: {
89
+				"b":  {},
90
+				"i":  {},
91
+				"br": {},
92
+				"ol": {},
93
+				"ul": {},
94
+				"li": {},
95
+				"h1": {},
96
+				"h2": {},
97
+				"u": 1,
98
+				"img": {
99
+					"check_attributes": {
100
+			            "width": "numbers",
101
+			            "alt": "alt",
102
+			            "src": "url",
103
+			            "height": "numbers"
104
+			        }
105
+				},
106
+				"a":  {
107
+					set_attributes: {
108
+						target: "_blank",
109
+						rel:    "nofollow"
110
+					},
111
+					check_attributes: {
112
+						href:   "url" // important to avoid XSS
113
+					}
114
+				}
115
+			}
116
+		}
117
+	};
118
+
119
+	var Wysihtml5 = function(el, options) {
120
+		this.el = el;
121
+		this.toolbar = this.createToolbar(el, options || defaultOptions);
122
+		this.editor =  this.createEditor(options);
123
+		
124
+		window.editor = this.editor;
125
+
126
+  		$('iframe.wysihtml5-sandbox').each(function(i, el){
127
+			$(el.contentWindow).off('focus.wysihtml5').on({
128
+			  'focus.wysihtml5' : function(){
129
+			     $('li.dropdown').removeClass('open');
130
+			   }
131
+			});
132
+		});
133
+	};
134
+
135
+	Wysihtml5.prototype = {
136
+		constructor: Wysihtml5,
137
+
138
+		createEditor: function(options) {
139
+			var parserRules = defaultOptions.parserRules; 
140
+
141
+			if(options && options.parserRules) {
142
+				parserRules = options.parserRules;
143
+			}
144
+				
145
+			var editor = new wysi.Editor(this.el.attr('id'), {
146
+	    		toolbar: this.toolbar.attr('id'),
147
+				parserRules: parserRules
148
+	  		});
149
+
150
+	  		if(options && options.events) {
151
+				for(var eventName in options.events) {
152
+					editor.on(eventName, options.events[eventName]);
153
+				}
154
+			}	
155
+
156
+	  		return editor;
157
+		},
158
+		
159
+		createToolbar: function(el, options) {
160
+			var self = this;
161
+			var toolbar = $("<ul/>", {
162
+				'id' : el.attr('id') + "-wysihtml5-toolbar",
163
+				'class' : "wysihtml5-toolbar",
164
+				'style': "display:none"
165
+			});
166
+
167
+			for(var key in defaultOptions) {
168
+				var value = false;
169
+				
170
+				if(options[key] != undefined) {
171
+					if(options[key] == true) {
172
+						value = true;
173
+					}
174
+				} else {
175
+					value = defaultOptions[key];
176
+				}
177
+				
178
+				if(value == true) {
179
+					toolbar.append(templates[key]);
180
+
181
+					if(key == "html") {
182
+						this.initHtml(toolbar);
183
+					}
184
+
185
+					if(key == "link") {
186
+						this.initInsertLink(toolbar);
187
+					}
188
+
189
+					if(key == "image") {
190
+						this.initInsertImage(toolbar);
191
+					}
192
+				}
193
+			}
194
+			
195
+			var self = this;
196
+			
197
+			toolbar.find("a[data-wysihtml5-command='formatBlock']").click(function(e) {
198
+				var el = $(e.srcElement);
199
+				self.toolbar.find('.current-font').text(el.html())
200
+			});
201
+			
202
+			this.el.before(toolbar);
203
+			
204
+			return toolbar;
205
+		},
206
+
207
+		initHtml: function(toolbar) {
208
+			var changeViewSelector = "a[data-wysihtml5-action='change_view']";
209
+			toolbar.find(changeViewSelector).click(function(e) {
210
+				toolbar.find('a.btn').not(changeViewSelector).toggleClass('disabled');
211
+			});
212
+		},
213
+
214
+		initInsertImage: function(toolbar) {
215
+			var self = this;
216
+			var insertImageModal = toolbar.find('.bootstrap-wysihtml5-insert-image-modal');
217
+			var urlInput = insertImageModal.find('.bootstrap-wysihtml5-insert-image-url');
218
+			var insertButton = insertImageModal.find('a.btn-primary');
219
+			var initialValue = urlInput.val();
220
+
221
+			var insertImage = function() { 
222
+				var url = urlInput.val();
223
+				urlInput.val(initialValue);
224
+				self.editor.composer.commands.exec("insertImage", url);
225
+			};
226
+			
227
+			urlInput.keypress(function(e) {
228
+				if(e.which == 13) {
229
+					insertImage();
230
+					insertImageModal.modal('hide');
231
+				}
232
+			});
233
+
234
+			insertButton.click(insertImage);
235
+
236
+			insertImageModal.on('shown', function() {
237
+				urlInput.focus();
238
+			});
239
+
240
+			insertImageModal.on('hide', function() { 
241
+				self.editor.currentView.element.focus();
242
+			});
243
+
244
+			toolbar.find('a[data-wysihtml5-command=insertImage]').click(function() {
245
+				insertImageModal.modal('show');
246
+			});
247
+		},
248
+
249
+		initInsertLink: function(toolbar) {
250
+			var self = this;
251
+			var insertLinkModal = toolbar.find('.bootstrap-wysihtml5-insert-link-modal');
252
+			var urlInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-url');
253
+			var insertButton = insertLinkModal.find('a.btn-primary');
254
+			var initialValue = urlInput.val();
255
+
256
+			var insertLink = function() { 
257
+				var url = urlInput.val();
258
+				urlInput.val(initialValue);
259
+				self.editor.composer.commands.exec("createLink", { 
260
+					href: url, 
261
+					target: "_blank", 
262
+					rel: "nofollow" 
263
+				});
264
+			};
265
+			var pressedEnter = false;
266
+
267
+			urlInput.keypress(function(e) {
268
+				if(e.which == 13) {
269
+					insertLink();
270
+					insertLinkModal.modal('hide');
271
+				}
272
+			});
273
+
274
+			insertButton.click(insertLink);
275
+
276
+			insertLinkModal.on('shown', function() {
277
+				urlInput.focus();
278
+			});
279
+
280
+			insertLinkModal.on('hide', function() { 
281
+				self.editor.currentView.element.focus();
282
+			});
283
+
284
+			toolbar.find('a[data-wysihtml5-command=createLink]').click(function() {
285
+				insertLinkModal.modal('show');
286
+			});
287
+		}
288
+	};
289
+
290
+	$.fn.wysihtml5 = function (options) {
291
+		return this.each(function () {
292
+			var $this = $(this);
293
+	      	$this.data('wysihtml5', new Wysihtml5($this, options));
294
+	    })
295
+  	};
296
+
297
+  	$.fn.wysihtml5.Constructor = Wysihtml5;
298
+
299
+}(window.jQuery, window.wysihtml5);

File diff suppressed because it is too large
+ 1 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min.js


BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/.DS_Store View File


BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/.DS_Store View File


+ 686 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap-responsive.css View File

@@ -0,0 +1,686 @@
1
+/*!
2
+ * Bootstrap Responsive v2.0.2
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+.clearfix {
11
+  *zoom: 1;
12
+}
13
+.clearfix:before,
14
+.clearfix:after {
15
+  display: table;
16
+  content: "";
17
+}
18
+.clearfix:after {
19
+  clear: both;
20
+}
21
+.hide-text {
22
+  overflow: hidden;
23
+  text-indent: 100%;
24
+  white-space: nowrap;
25
+}
26
+.input-block-level {
27
+  display: block;
28
+  width: 100%;
29
+  min-height: 28px;
30
+  /* Make inputs at least the height of their button counterpart */
31
+
32
+  /* Makes inputs behave like true block-level elements */
33
+
34
+  -webkit-box-sizing: border-box;
35
+  -moz-box-sizing: border-box;
36
+  -ms-box-sizing: border-box;
37
+  box-sizing: border-box;
38
+}
39
+.hidden {
40
+  display: none;
41
+  visibility: hidden;
42
+}
43
+.visible-phone {
44
+  display: none;
45
+}
46
+.visible-tablet {
47
+  display: none;
48
+}
49
+.visible-desktop {
50
+  display: block;
51
+}
52
+.hidden-phone {
53
+  display: block;
54
+}
55
+.hidden-tablet {
56
+  display: block;
57
+}
58
+.hidden-desktop {
59
+  display: none;
60
+}
61
+@media (max-width: 767px) {
62
+  .visible-phone {
63
+    display: block;
64
+  }
65
+  .hidden-phone {
66
+    display: none;
67
+  }
68
+  .hidden-desktop {
69
+    display: block;
70
+  }
71
+  .visible-desktop {
72
+    display: none;
73
+  }
74
+}
75
+@media (min-width: 768px) and (max-width: 979px) {
76
+  .visible-tablet {
77
+    display: block;
78
+  }
79
+  .hidden-tablet {
80
+    display: none;
81
+  }
82
+  .hidden-desktop {
83
+    display: block;
84
+  }
85
+  .visible-desktop {
86
+    display: none;
87
+  }
88
+}
89
+@media (max-width: 480px) {
90
+  .nav-collapse {
91
+    -webkit-transform: translate3d(0, 0, 0);
92
+  }
93
+  .page-header h1 small {
94
+    display: block;
95
+    line-height: 18px;
96
+  }
97
+  input[type="checkbox"],
98
+  input[type="radio"] {
99
+    border: 1px solid #ccc;
100
+  }
101
+  .form-horizontal .control-group > label {
102
+    float: none;
103
+    width: auto;
104
+    padding-top: 0;
105
+    text-align: left;
106
+  }
107
+  .form-horizontal .controls {
108
+    margin-left: 0;
109
+  }
110
+  .form-horizontal .control-list {
111
+    padding-top: 0;
112
+  }
113
+  .form-horizontal .form-actions {
114
+    padding-left: 10px;
115
+    padding-right: 10px;
116
+  }
117
+  .modal {
118
+    position: absolute;
119
+    top: 10px;
120
+    left: 10px;
121
+    right: 10px;
122
+    width: auto;
123
+    margin: 0;
124
+  }
125
+  .modal.fade.in {
126
+    top: auto;
127
+  }
128
+  .modal-header .close {
129
+    padding: 10px;
130
+    margin: -10px;
131
+  }
132
+  .carousel-caption {
133
+    position: static;
134
+  }
135
+}
136
+@media (max-width: 767px) {
137
+  body {
138
+    padding-left: 20px;
139
+    padding-right: 20px;
140
+  }
141
+  .navbar-fixed-top {
142
+    margin-left: -20px;
143
+    margin-right: -20px;
144
+  }
145
+  .container {
146
+    width: auto;
147
+  }
148
+  .row-fluid {
149
+    width: 100%;
150
+  }
151
+  .row {
152
+    margin-left: 0;
153
+  }
154
+  .row > [class*="span"],
155
+  .row-fluid > [class*="span"] {
156
+    float: none;
157
+    display: block;
158
+    width: auto;
159
+    margin: 0;
160
+  }
161
+  .thumbnails [class*="span"] {
162
+    width: auto;
163
+  }
164
+  input[class*="span"],
165
+  select[class*="span"],
166
+  textarea[class*="span"],
167
+  .uneditable-input {
168
+    display: block;
169
+    width: 100%;
170
+    min-height: 28px;
171
+    /* Make inputs at least the height of their button counterpart */
172
+  
173
+    /* Makes inputs behave like true block-level elements */
174
+  
175
+    -webkit-box-sizing: border-box;
176
+    -moz-box-sizing: border-box;
177
+    -ms-box-sizing: border-box;
178
+    box-sizing: border-box;
179
+  }
180
+  .input-prepend input[class*="span"],
181
+  .input-append input[class*="span"] {
182
+    width: auto;
183
+  }
184
+}
185
+@media (min-width: 768px) and (max-width: 979px) {
186
+  .row {
187
+    margin-left: -20px;
188
+    *zoom: 1;
189
+  }
190
+  .row:before,
191
+  .row:after {
192
+    display: table;
193
+    content: "";
194
+  }
195
+  .row:after {
196
+    clear: both;
197
+  }
198
+  [class*="span"] {
199
+    float: left;
200
+    margin-left: 20px;
201
+  }
202
+  .container,
203
+  .navbar-fixed-top .container,
204
+  .navbar-fixed-bottom .container {
205
+    width: 724px;
206
+  }
207
+  .span12 {
208
+    width: 724px;
209
+  }
210
+  .span11 {
211
+    width: 662px;
212
+  }
213
+  .span10 {
214
+    width: 600px;
215
+  }
216
+  .span9 {
217
+    width: 538px;
218
+  }
219
+  .span8 {
220
+    width: 476px;
221
+  }
222
+  .span7 {
223
+    width: 414px;
224
+  }
225
+  .span6 {
226
+    width: 352px;
227
+  }
228
+  .span5 {
229
+    width: 290px;
230
+  }
231
+  .span4 {
232
+    width: 228px;
233
+  }
234
+  .span3 {
235
+    width: 166px;
236
+  }
237
+  .span2 {
238
+    width: 104px;
239
+  }
240
+  .span1 {
241
+    width: 42px;
242
+  }
243
+  .offset12 {
244
+    margin-left: 764px;
245
+  }
246
+  .offset11 {
247
+    margin-left: 702px;
248
+  }
249
+  .offset10 {
250
+    margin-left: 640px;
251
+  }
252
+  .offset9 {
253
+    margin-left: 578px;
254
+  }
255
+  .offset8 {
256
+    margin-left: 516px;
257
+  }
258
+  .offset7 {
259
+    margin-left: 454px;
260
+  }
261
+  .offset6 {
262
+    margin-left: 392px;
263
+  }
264
+  .offset5 {
265
+    margin-left: 330px;
266
+  }
267
+  .offset4 {
268
+    margin-left: 268px;
269
+  }
270
+  .offset3 {
271
+    margin-left: 206px;
272
+  }
273
+  .offset2 {
274
+    margin-left: 144px;
275
+  }
276
+  .offset1 {
277
+    margin-left: 82px;
278
+  }
279
+  .row-fluid {
280
+    width: 100%;
281
+    *zoom: 1;
282
+  }
283
+  .row-fluid:before,
284
+  .row-fluid:after {
285
+    display: table;
286
+    content: "";
287
+  }
288
+  .row-fluid:after {
289
+    clear: both;
290
+  }
291
+  .row-fluid > [class*="span"] {
292
+    float: left;
293
+    margin-left: 2.762430939%;
294
+  }
295
+  .row-fluid > [class*="span"]:first-child {
296
+    margin-left: 0;
297
+  }
298
+  .row-fluid > .span12 {
299
+    width: 99.999999993%;
300
+  }
301
+  .row-fluid > .span11 {
302
+    width: 91.436464082%;
303
+  }
304
+  .row-fluid > .span10 {
305
+    width: 82.87292817100001%;
306
+  }
307
+  .row-fluid > .span9 {
308
+    width: 74.30939226%;
309
+  }
310
+  .row-fluid > .span8 {
311
+    width: 65.74585634900001%;
312
+  }
313
+  .row-fluid > .span7 {
314
+    width: 57.182320438000005%;
315
+  }
316
+  .row-fluid > .span6 {
317
+    width: 48.618784527%;
318
+  }
319
+  .row-fluid > .span5 {
320
+    width: 40.055248616%;
321
+  }
322
+  .row-fluid > .span4 {
323
+    width: 31.491712705%;
324
+  }
325
+  .row-fluid > .span3 {
326
+    width: 22.928176794%;
327
+  }
328
+  .row-fluid > .span2 {
329
+    width: 14.364640883%;
330
+  }
331
+  .row-fluid > .span1 {
332
+    width: 5.801104972%;
333
+  }
334
+  input,
335
+  textarea,
336
+  .uneditable-input {
337
+    margin-left: 0;
338
+  }
339
+  input.span12, textarea.span12, .uneditable-input.span12 {
340
+    width: 714px;
341
+  }
342
+  input.span11, textarea.span11, .uneditable-input.span11 {
343
+    width: 652px;
344
+  }
345
+  input.span10, textarea.span10, .uneditable-input.span10 {
346
+    width: 590px;
347
+  }
348
+  input.span9, textarea.span9, .uneditable-input.span9 {
349
+    width: 528px;
350
+  }
351
+  input.span8, textarea.span8, .uneditable-input.span8 {
352
+    width: 466px;
353
+  }
354
+  input.span7, textarea.span7, .uneditable-input.span7 {
355
+    width: 404px;
356
+  }
357
+  input.span6, textarea.span6, .uneditable-input.span6 {
358
+    width: 342px;
359
+  }
360
+  input.span5, textarea.span5, .uneditable-input.span5 {
361
+    width: 280px;
362
+  }
363
+  input.span4, textarea.span4, .uneditable-input.span4 {
364
+    width: 218px;
365
+  }
366
+  input.span3, textarea.span3, .uneditable-input.span3 {
367
+    width: 156px;
368
+  }
369
+  input.span2, textarea.span2, .uneditable-input.span2 {
370
+    width: 94px;
371
+  }
372
+  input.span1, textarea.span1, .uneditable-input.span1 {
373
+    width: 32px;
374
+  }
375
+}
376
+@media (max-width: 979px) {
377
+  body {
378
+    padding-top: 0;
379
+  }
380
+  .navbar-fixed-top {
381
+    position: static;
382
+    margin-bottom: 18px;
383
+  }
384
+  .navbar-fixed-top .navbar-inner {
385
+    padding: 5px;
386
+  }
387
+  .navbar .container {
388
+    width: auto;
389
+    padding: 0;
390
+  }
391
+  .navbar .brand {
392
+    padding-left: 10px;
393
+    padding-right: 10px;
394
+    margin: 0 0 0 -5px;
395
+  }
396
+  .navbar .nav-collapse {
397
+    clear: left;
398
+  }
399
+  .navbar .nav {
400
+    float: none;
401
+    margin: 0 0 9px;
402
+  }
403
+  .navbar .nav > li {
404
+    float: none;
405
+  }
406
+  .navbar .nav > li > a {
407
+    margin-bottom: 2px;
408
+  }
409
+  .navbar .nav > .divider-vertical {
410
+    display: none;
411
+  }
412
+  .navbar .nav .nav-header {
413
+    color: #999999;
414
+    text-shadow: none;
415
+  }
416
+  .navbar .nav > li > a,
417
+  .navbar .dropdown-menu a {
418
+    padding: 6px 15px;
419
+    font-weight: bold;
420
+    color: #999999;
421
+    -webkit-border-radius: 3px;
422
+    -moz-border-radius: 3px;
423
+    border-radius: 3px;
424
+  }
425
+  .navbar .dropdown-menu li + li a {
426
+    margin-bottom: 2px;
427
+  }
428
+  .navbar .nav > li > a:hover,
429
+  .navbar .dropdown-menu a:hover {
430
+    background-color: #222222;
431
+  }
432
+  .navbar .dropdown-menu {
433
+    position: static;
434
+    top: auto;
435
+    left: auto;
436
+    float: none;
437
+    display: block;
438
+    max-width: none;
439
+    margin: 0 15px;
440
+    padding: 0;
441
+    background-color: transparent;
442
+    border: none;
443
+    -webkit-border-radius: 0;
444
+    -moz-border-radius: 0;
445
+    border-radius: 0;
446
+    -webkit-box-shadow: none;
447
+    -moz-box-shadow: none;
448
+    box-shadow: none;
449
+  }
450
+  .navbar .dropdown-menu:before,
451
+  .navbar .dropdown-menu:after {
452
+    display: none;
453
+  }
454
+  .navbar .dropdown-menu .divider {
455
+    display: none;
456
+  }
457
+  .navbar-form,
458
+  .navbar-search {
459
+    float: none;
460
+    padding: 9px 15px;
461
+    margin: 9px 0;
462
+    border-top: 1px solid #222222;
463
+    border-bottom: 1px solid #222222;
464
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
465
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
466
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
467
+  }
468
+  .navbar .nav.pull-right {
469
+    float: none;
470
+    margin-left: 0;
471
+  }
472
+  .navbar-static .navbar-inner {
473
+    padding-left: 10px;
474
+    padding-right: 10px;
475
+  }
476
+  .btn-navbar {
477
+    display: block;
478
+  }
479
+  .nav-collapse {
480
+    overflow: hidden;
481
+    height: 0;
482
+  }
483
+}
484
+@media (min-width: 980px) {
485
+  .nav-collapse.collapse {
486
+    height: auto !important;
487
+    overflow: visible !important;
488
+  }
489
+}
490
+@media (min-width: 1200px) {
491
+  .row {
492
+    margin-left: -30px;
493
+    *zoom: 1;
494
+  }
495
+  .row:before,
496
+  .row:after {
497
+    display: table;
498
+    content: "";
499
+  }
500
+  .row:after {
501
+    clear: both;
502
+  }
503
+  [class*="span"] {
504
+    float: left;
505
+    margin-left: 30px;
506
+  }
507
+  .container,
508
+  .navbar-fixed-top .container,
509
+  .navbar-fixed-bottom .container {
510
+    width: 1170px;
511
+  }
512
+  .span12 {
513
+    width: 1170px;
514
+  }
515
+  .span11 {
516
+    width: 1070px;
517
+  }
518
+  .span10 {
519
+    width: 970px;
520
+  }
521
+  .span9 {
522
+    width: 870px;
523
+  }
524
+  .span8 {
525
+    width: 770px;
526
+  }
527
+  .span7 {
528
+    width: 670px;
529
+  }
530
+  .span6 {
531
+    width: 570px;
532
+  }
533
+  .span5 {
534
+    width: 470px;
535
+  }
536
+  .span4 {
537
+    width: 370px;
538
+  }
539
+  .span3 {
540
+    width: 270px;
541
+  }
542
+  .span2 {
543
+    width: 170px;
544
+  }
545
+  .span1 {
546
+    width: 70px;
547
+  }
548
+  .offset12 {
549
+    margin-left: 1230px;
550
+  }
551
+  .offset11 {
552
+    margin-left: 1130px;
553
+  }
554
+  .offset10 {
555
+    margin-left: 1030px;
556
+  }
557
+  .offset9 {
558
+    margin-left: 930px;
559
+  }
560
+  .offset8 {
561
+    margin-left: 830px;
562
+  }
563
+  .offset7 {
564
+    margin-left: 730px;
565
+  }
566
+  .offset6 {
567
+    margin-left: 630px;
568
+  }
569
+  .offset5 {
570
+    margin-left: 530px;
571
+  }
572
+  .offset4 {
573
+    margin-left: 430px;
574
+  }
575
+  .offset3 {
576
+    margin-left: 330px;
577
+  }
578
+  .offset2 {
579
+    margin-left: 230px;
580
+  }
581
+  .offset1 {
582
+    margin-left: 130px;
583
+  }
584
+  .row-fluid {
585
+    width: 100%;
586
+    *zoom: 1;
587
+  }
588
+  .row-fluid:before,
589
+  .row-fluid:after {
590
+    display: table;
591
+    content: "";
592
+  }
593
+  .row-fluid:after {
594
+    clear: both;
595
+  }
596
+  .row-fluid > [class*="span"] {
597
+    float: left;
598
+    margin-left: 2.564102564%;
599
+  }
600
+  .row-fluid > [class*="span"]:first-child {
601
+    margin-left: 0;
602
+  }
603
+  .row-fluid > .span12 {
604
+    width: 100%;
605
+  }
606
+  .row-fluid > .span11 {
607
+    width: 91.45299145300001%;
608
+  }
609
+  .row-fluid > .span10 {
610
+    width: 82.905982906%;
611
+  }
612
+  .row-fluid > .span9 {
613
+    width: 74.358974359%;
614
+  }
615
+  .row-fluid > .span8 {
616
+    width: 65.81196581200001%;
617
+  }
618
+  .row-fluid > .span7 {
619
+    width: 57.264957265%;
620
+  }
621
+  .row-fluid > .span6 {
622
+    width: 48.717948718%;
623
+  }
624
+  .row-fluid > .span5 {
625
+    width: 40.170940171000005%;
626
+  }
627
+  .row-fluid > .span4 {
628
+    width: 31.623931624%;
629
+  }
630
+  .row-fluid > .span3 {
631
+    width: 23.076923077%;
632
+  }
633
+  .row-fluid > .span2 {
634
+    width: 14.529914530000001%;
635
+  }
636
+  .row-fluid > .span1 {
637
+    width: 5.982905983%;
638
+  }
639
+  input,
640
+  textarea,
641
+  .uneditable-input {
642
+    margin-left: 0;
643
+  }
644
+  input.span12, textarea.span12, .uneditable-input.span12 {
645
+    width: 1160px;
646
+  }
647
+  input.span11, textarea.span11, .uneditable-input.span11 {
648
+    width: 1060px;
649
+  }
650
+  input.span10, textarea.span10, .uneditable-input.span10 {
651
+    width: 960px;
652
+  }
653
+  input.span9, textarea.span9, .uneditable-input.span9 {
654
+    width: 860px;
655
+  }
656
+  input.span8, textarea.span8, .uneditable-input.span8 {
657
+    width: 760px;
658
+  }
659
+  input.span7, textarea.span7, .uneditable-input.span7 {
660
+    width: 660px;
661
+  }
662
+  input.span6, textarea.span6, .uneditable-input.span6 {
663
+    width: 560px;
664
+  }
665
+  input.span5, textarea.span5, .uneditable-input.span5 {
666
+    width: 460px;
667
+  }
668
+  input.span4, textarea.span4, .uneditable-input.span4 {
669
+    width: 360px;
670
+  }
671
+  input.span3, textarea.span3, .uneditable-input.span3 {
672
+    width: 260px;
673
+  }
674
+  input.span2, textarea.span2, .uneditable-input.span2 {
675
+    width: 160px;
676
+  }
677
+  input.span1, textarea.span1, .uneditable-input.span1 {
678
+    width: 60px;
679
+  }
680
+  .thumbnails {
681
+    margin-left: -30px;
682
+  }
683
+  .thumbnails > li {
684
+    margin-left: 30px;
685
+  }
686
+}

File diff suppressed because it is too large
+ 12 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap-responsive.min.css


File diff suppressed because it is too large
+ 3990 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.css


+ 689 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.min.css View File

@@ -0,0 +1,689 @@
1
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
2
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
3
+audio:not([controls]){display:none;}
4
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
5
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
6
+a:hover,a:active{outline:0;}
7
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
8
+sup{top:-0.5em;}
9
+sub{bottom:-0.25em;}
10
+img{height:auto;border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;}
11
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
12
+button,input{*overflow:visible;line-height:normal;}
13
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
14
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
15
+input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
16
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
17
+textarea{overflow:auto;vertical-align:top;}
18
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";}
19
+.clearfix:after{clear:both;}
20
+.hide-text{overflow:hidden;text-indent:100%;white-space:nowrap;}
21
+.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}
22
+body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;}
23
+a{color:#0088cc;text-decoration:none;}
24
+a:hover{color:#005580;text-decoration:underline;}
25
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";}
26
+.row:after{clear:both;}
27
+[class*="span"]{float:left;margin-left:20px;}
28
+.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
29
+.span12{width:940px;}
30
+.span11{width:860px;}
31
+.span10{width:780px;}
32
+.span9{width:700px;}
33
+.span8{width:620px;}
34
+.span7{width:540px;}
35
+.span6{width:460px;}
36
+.span5{width:380px;}
37
+.span4{width:300px;}
38
+.span3{width:220px;}
39
+.span2{width:140px;}
40
+.span1{width:60px;}
41
+.offset12{margin-left:980px;}
42
+.offset11{margin-left:900px;}
43
+.offset10{margin-left:820px;}
44
+.offset9{margin-left:740px;}
45
+.offset8{margin-left:660px;}
46
+.offset7{margin-left:580px;}
47
+.offset6{margin-left:500px;}
48
+.offset5{margin-left:420px;}
49
+.offset4{margin-left:340px;}
50
+.offset3{margin-left:260px;}
51
+.offset2{margin-left:180px;}
52
+.offset1{margin-left:100px;}
53
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";}
54
+.row-fluid:after{clear:both;}
55
+.row-fluid>[class*="span"]{float:left;margin-left:2.127659574%;}
56
+.row-fluid>[class*="span"]:first-child{margin-left:0;}
57
+.row-fluid > .span12{width:99.99999998999999%;}
58
+.row-fluid > .span11{width:91.489361693%;}
59
+.row-fluid > .span10{width:82.97872339599999%;}
60
+.row-fluid > .span9{width:74.468085099%;}
61
+.row-fluid > .span8{width:65.95744680199999%;}
62
+.row-fluid > .span7{width:57.446808505%;}
63
+.row-fluid > .span6{width:48.93617020799999%;}
64
+.row-fluid > .span5{width:40.425531911%;}
65
+.row-fluid > .span4{width:31.914893614%;}
66
+.row-fluid > .span3{width:23.404255317%;}
67
+.row-fluid > .span2{width:14.89361702%;}
68
+.row-fluid > .span1{width:6.382978723%;}
69
+.container{margin-left:auto;margin-right:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";}
70
+.container:after{clear:both;}
71
+.container-fluid{padding-left:20px;padding-right:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";}
72
+.container-fluid:after{clear:both;}
73
+p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;}
74
+.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;}
75
+h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;}
76
+h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
77
+h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
78
+h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
79
+h4,h5,h6{line-height:18px;}
80
+h4{font-size:14px;}h4 small{font-size:12px;}
81
+h5{font-size:12px;}
82
+h6{font-size:11px;color:#999999;text-transform:uppercase;}
83
+.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;}
84
+.page-header h1{line-height:1;}
85
+ul,ol{padding:0;margin:0 0 9px 25px;}
86
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
87
+ul{list-style:disc;}
88
+ol{list-style:decimal;}
89
+li{line-height:18px;}
90
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
91
+dl{margin-bottom:18px;}
92
+dt,dd{line-height:18px;}
93
+dt{font-weight:bold;line-height:17px;}
94
+dd{margin-left:9px;}
95
+.dl-horizontal dt{float:left;clear:left;width:120px;text-align:right;}
96
+.dl-horizontal dd{margin-left:130px;}
97
+hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
98
+strong{font-weight:bold;}
99
+em{font-style:italic;}
100
+.muted{color:#999999;}
101
+abbr[title]{border-bottom:1px dotted #ddd;cursor:help;}
102
+abbr.initialism{font-size:90%;text-transform:uppercase;}
103
+blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;}
104
+blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
105
+blockquote.pull-right{float:right;padding-left:0;padding-right:15px;border-left:0;border-right:5px solid #eeeeee;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
106
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
107
+address{display:block;margin-bottom:18px;line-height:18px;font-style:normal;}
108
+small{font-size:100%;}
109
+cite{font-style:normal;}
110
+code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
111
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;}
112
+pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;white-space:pre;white-space:pre-wrap;word-break:break-all;word-wrap:break-word;}pre.prettyprint{margin-bottom:18px;}
113
+pre code{padding:0;color:inherit;background-color:transparent;border:0;}
114
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
115
+form{margin:0 0 18px;}
116
+fieldset{padding:0;margin:0;border:0;}
117
+legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;}
118
+label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;}
119
+input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
120
+label{display:block;margin-bottom:5px;color:#333333;}
121
+input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
122
+.uneditable-textarea{width:auto;height:auto;}
123
+label input,label textarea,label select{display:block;}
124
+input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border:0 \9;}
125
+input[type="image"]{border:0;}
126
+input[type="file"]{width:auto;padding:initial;line-height:initial;border:initial;background-color:#ffffff;background-color:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
127
+input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;}
128
+select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;}
129
+input[type="file"]{line-height:18px \9;}
130
+select{width:220px;background-color:#ffffff;}
131
+select[multiple],select[size]{height:auto;}
132
+input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
133
+textarea{height:auto;}
134
+input[type="hidden"]{display:none;}
135
+.radio,.checkbox{padding-left:18px;}
136
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;}
137
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
138
+.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
139
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
140
+input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;}
141
+input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;}
142
+input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
143
+.input-mini{width:60px;}
144
+.input-small{width:90px;}
145
+.input-medium{width:150px;}
146
+.input-large{width:210px;}
147
+.input-xlarge{width:270px;}
148
+.input-xxlarge{width:530px;}
149
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{float:none;margin-left:0;}
150
+input,textarea,.uneditable-input{margin-left:0;}
151
+input.span12, textarea.span12, .uneditable-input.span12{width:930px;}
152
+input.span11, textarea.span11, .uneditable-input.span11{width:850px;}
153
+input.span10, textarea.span10, .uneditable-input.span10{width:770px;}
154
+input.span9, textarea.span9, .uneditable-input.span9{width:690px;}
155
+input.span8, textarea.span8, .uneditable-input.span8{width:610px;}
156
+input.span7, textarea.span7, .uneditable-input.span7{width:530px;}
157
+input.span6, textarea.span6, .uneditable-input.span6{width:450px;}
158
+input.span5, textarea.span5, .uneditable-input.span5{width:370px;}
159
+input.span4, textarea.span4, .uneditable-input.span4{width:290px;}
160
+input.span3, textarea.span3, .uneditable-input.span3{width:210px;}
161
+input.span2, textarea.span2, .uneditable-input.span2{width:130px;}
162
+input.span1, textarea.span1, .uneditable-input.span1{width:50px;}
163
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#eeeeee;border-color:#ddd;cursor:not-allowed;}
164
+.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
165
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;}
166
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
167
+.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
168
+.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;}
169
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
170
+.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
171
+.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;}
172
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
173
+input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
174
+.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#eeeeee;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
175
+.form-actions:after{clear:both;}
176
+.uneditable-input{display:block;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
177
+:-moz-placeholder{color:#999999;}
178
+::-webkit-input-placeholder{color:#999999;}
179
+.help-block,.help-inline{color:#555555;}
180
+.help-block{display:block;margin-bottom:9px;}
181
+.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
182
+.input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{*margin-left:0;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{position:relative;z-index:2;}
183
+.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;}
184
+.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;min-width:16px;height:18px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;}
185
+.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
186
+.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;}
187
+.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
188
+.input-append input,.input-append select .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
189
+.input-append .uneditable-input{border-left-color:#eee;border-right-color:#ccc;}
190
+.input-append .add-on,.input-append .btn{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
191
+.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
192
+.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
193
+.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
194
+.search-query{padding-left:14px;padding-right:14px;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;}
195
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;margin-bottom:0;}
196
+.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
197
+.form-search label,.form-inline label{display:inline-block;}
198
+.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
199
+.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
200
+.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-left:0;margin-right:3px;}
201
+.control-group{margin-bottom:9px;}
202
+legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;}
203
+.form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";}
204
+.form-horizontal .control-group:after{clear:both;}
205
+.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;}
206
+.form-horizontal .controls{margin-left:160px;*display:inline-block;*margin-left:0;*padding-left:20px;}
207
+.form-horizontal .help-block{margin-top:9px;margin-bottom:0;}
208
+.form-horizontal .form-actions{padding-left:160px;}
209
+table{max-width:100%;border-collapse:collapse;border-spacing:0;background-color:transparent;}
210
+.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
211
+.table th{font-weight:bold;}
212
+.table thead th{vertical-align:bottom;}
213
+.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
214
+.table tbody+tbody{border-top:2px solid #dddddd;}
215
+.table-condensed th,.table-condensed td{padding:4px 5px;}
216
+.table-bordered{border:1px solid #dddddd;border-left:0;border-collapse:separate;*border-collapse:collapsed;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
217
+.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
218
+.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
219
+.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
220
+.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
221
+.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
222
+.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
223
+.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;}
224
+table .span1{float:none;width:44px;margin-left:0;}
225
+table .span2{float:none;width:124px;margin-left:0;}
226
+table .span3{float:none;width:204px;margin-left:0;}
227
+table .span4{float:none;width:284px;margin-left:0;}
228
+table .span5{float:none;width:364px;margin-left:0;}
229
+table .span6{float:none;width:444px;margin-left:0;}
230
+table .span7{float:none;width:524px;margin-left:0;}
231
+table .span8{float:none;width:604px;margin-left:0;}
232
+table .span9{float:none;width:684px;margin-left:0;}
233
+table .span10{float:none;width:764px;margin-left:0;}
234
+table .span11{float:none;width:844px;margin-left:0;}
235
+table .span12{float:none;width:924px;margin-left:0;}
236
+table .span13{float:none;width:1004px;margin-left:0;}
237
+table .span14{float:none;width:1084px;margin-left:0;}
238
+table .span15{float:none;width:1164px;margin-left:0;}
239
+table .span16{float:none;width:1244px;margin-left:0;}
240
+table .span17{float:none;width:1324px;margin-left:0;}
241
+table .span18{float:none;width:1404px;margin-left:0;}
242
+table .span19{float:none;width:1484px;margin-left:0;}
243
+table .span20{float:none;width:1564px;margin-left:0;}
244
+table .span21{float:none;width:1644px;margin-left:0;}
245
+table .span22{float:none;width:1724px;margin-left:0;}
246
+table .span23{float:none;width:1804px;margin-left:0;}
247
+table .span24{float:none;width:1884px;margin-left:0;}
248
+[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;*margin-right:.3em;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
249
+.icon-white{background-image:url("../img/glyphicons-halflings-white.png");}
250
+.icon-glass{background-position:0 0;}
251
+.icon-music{background-position:-24px 0;}
252
+.icon-search{background-position:-48px 0;}
253
+.icon-envelope{background-position:-72px 0;}
254
+.icon-heart{background-position:-96px 0;}
255
+.icon-star{background-position:-120px 0;}
256
+.icon-star-empty{background-position:-144px 0;}
257
+.icon-user{background-position:-168px 0;}
258
+.icon-film{background-position:-192px 0;}
259
+.icon-th-large{background-position:-216px 0;}
260
+.icon-th{background-position:-240px 0;}
261
+.icon-th-list{background-position:-264px 0;}
262
+.icon-ok{background-position:-288px 0;}
263
+.icon-remove{background-position:-312px 0;}
264
+.icon-zoom-in{background-position:-336px 0;}
265
+.icon-zoom-out{background-position:-360px 0;}
266
+.icon-off{background-position:-384px 0;}
267
+.icon-signal{background-position:-408px 0;}
268
+.icon-cog{background-position:-432px 0;}
269
+.icon-trash{background-position:-456px 0;}
270
+.icon-home{background-position:0 -24px;}
271
+.icon-file{background-position:-24px -24px;}
272
+.icon-time{background-position:-48px -24px;}
273
+.icon-road{background-position:-72px -24px;}
274
+.icon-download-alt{background-position:-96px -24px;}
275
+.icon-download{background-position:-120px -24px;}
276
+.icon-upload{background-position:-144px -24px;}
277
+.icon-inbox{background-position:-168px -24px;}
278
+.icon-play-circle{background-position:-192px -24px;}
279
+.icon-repeat{background-position:-216px -24px;}
280
+.icon-refresh{background-position:-240px -24px;}
281
+.icon-list-alt{background-position:-264px -24px;}
282
+.icon-lock{background-position:-287px -24px;}
283
+.icon-flag{background-position:-312px -24px;}
284
+.icon-headphones{background-position:-336px -24px;}
285
+.icon-volume-off{background-position:-360px -24px;}
286
+.icon-volume-down{background-position:-384px -24px;}
287
+.icon-volume-up{background-position:-408px -24px;}
288
+.icon-qrcode{background-position:-432px -24px;}
289
+.icon-barcode{background-position:-456px -24px;}
290
+.icon-tag{background-position:0 -48px;}
291
+.icon-tags{background-position:-25px -48px;}
292
+.icon-book{background-position:-48px -48px;}
293
+.icon-bookmark{background-position:-72px -48px;}
294
+.icon-print{background-position:-96px -48px;}
295
+.icon-camera{background-position:-120px -48px;}
296
+.icon-font{background-position:-144px -48px;}
297
+.icon-bold{background-position:-167px -48px;}
298
+.icon-italic{background-position:-192px -48px;}
299
+.icon-text-height{background-position:-216px -48px;}
300
+.icon-text-width{background-position:-240px -48px;}
301
+.icon-align-left{background-position:-264px -48px;}
302
+.icon-align-center{background-position:-288px -48px;}
303
+.icon-align-right{background-position:-312px -48px;}
304
+.icon-align-justify{background-position:-336px -48px;}
305
+.icon-list{background-position:-360px -48px;}
306
+.icon-indent-left{background-position:-384px -48px;}
307
+.icon-indent-right{background-position:-408px -48px;}
308
+.icon-facetime-video{background-position:-432px -48px;}
309
+.icon-picture{background-position:-456px -48px;}
310
+.icon-pencil{background-position:0 -72px;}
311
+.icon-map-marker{background-position:-24px -72px;}
312
+.icon-adjust{background-position:-48px -72px;}
313
+.icon-tint{background-position:-72px -72px;}
314
+.icon-edit{background-position:-96px -72px;}
315
+.icon-share{background-position:-120px -72px;}
316
+.icon-check{background-position:-144px -72px;}
317
+.icon-move{background-position:-168px -72px;}
318
+.icon-step-backward{background-position:-192px -72px;}
319
+.icon-fast-backward{background-position:-216px -72px;}
320
+.icon-backward{background-position:-240px -72px;}
321
+.icon-play{background-position:-264px -72px;}
322
+.icon-pause{background-position:-288px -72px;}
323
+.icon-stop{background-position:-312px -72px;}
324
+.icon-forward{background-position:-336px -72px;}
325
+.icon-fast-forward{background-position:-360px -72px;}
326
+.icon-step-forward{background-position:-384px -72px;}
327
+.icon-eject{background-position:-408px -72px;}
328
+.icon-chevron-left{background-position:-432px -72px;}
329
+.icon-chevron-right{background-position:-456px -72px;}
330
+.icon-plus-sign{background-position:0 -96px;}
331
+.icon-minus-sign{background-position:-24px -96px;}
332
+.icon-remove-sign{background-position:-48px -96px;}
333
+.icon-ok-sign{background-position:-72px -96px;}
334
+.icon-question-sign{background-position:-96px -96px;}
335
+.icon-info-sign{background-position:-120px -96px;}
336
+.icon-screenshot{background-position:-144px -96px;}
337
+.icon-remove-circle{background-position:-168px -96px;}
338
+.icon-ok-circle{background-position:-192px -96px;}
339
+.icon-ban-circle{background-position:-216px -96px;}
340
+.icon-arrow-left{background-position:-240px -96px;}
341
+.icon-arrow-right{background-position:-264px -96px;}
342
+.icon-arrow-up{background-position:-289px -96px;}
343
+.icon-arrow-down{background-position:-312px -96px;}
344
+.icon-share-alt{background-position:-336px -96px;}
345
+.icon-resize-full{background-position:-360px -96px;}
346
+.icon-resize-small{background-position:-384px -96px;}
347
+.icon-plus{background-position:-408px -96px;}
348
+.icon-minus{background-position:-433px -96px;}
349
+.icon-asterisk{background-position:-456px -96px;}
350
+.icon-exclamation-sign{background-position:0 -120px;}
351
+.icon-gift{background-position:-24px -120px;}
352
+.icon-leaf{background-position:-48px -120px;}
353
+.icon-fire{background-position:-72px -120px;}
354
+.icon-eye-open{background-position:-96px -120px;}
355
+.icon-eye-close{background-position:-120px -120px;}
356
+.icon-warning-sign{background-position:-144px -120px;}
357
+.icon-plane{background-position:-168px -120px;}
358
+.icon-calendar{background-position:-192px -120px;}
359
+.icon-random{background-position:-216px -120px;}
360
+.icon-comment{background-position:-240px -120px;}
361
+.icon-magnet{background-position:-264px -120px;}
362
+.icon-chevron-up{background-position:-288px -120px;}
363
+.icon-chevron-down{background-position:-313px -119px;}
364
+.icon-retweet{background-position:-336px -120px;}
365
+.icon-shopping-cart{background-position:-360px -120px;}
366
+.icon-folder-close{background-position:-384px -120px;}
367
+.icon-folder-open{background-position:-408px -120px;}
368
+.icon-resize-vertical{background-position:-432px -119px;}
369
+.icon-resize-horizontal{background-position:-456px -118px;}
370
+.dropdown{position:relative;}
371
+.dropdown-toggle{*margin-bottom:-3px;}
372
+.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
373
+.caret{display:inline-block;width:0;height:0;vertical-align:top;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000000;opacity:0.3;filter:alpha(opacity=30);content:"";}
374
+.dropdown .caret{margin-top:8px;margin-left:2px;}
375
+.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100);}
376
+.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;padding:4px 0;margin:0;list-style:none;background-color:#ffffff;border-color:#ccc;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px;}.dropdown-menu.pull-right{right:0;left:auto;}
377
+.dropdown-menu .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
378
+.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333333;white-space:nowrap;}
379
+.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;background-color:#0088cc;}
380
+.dropdown.open{*z-index:1000;}.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
381
+.dropdown.open .dropdown-menu{display:block;}
382
+.pull-right .dropdown-menu{left:auto;right:0;}
383
+.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"\2191";}
384
+.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
385
+.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
386
+.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
387
+.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
388
+.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
389
+.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
390
+.collapse{-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-ms-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;position:relative;overflow:hidden;height:0;}.collapse.in{height:auto;}
391
+.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;opacity:0.4;filter:alpha(opacity=40);cursor:pointer;}
392
+.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);border:1px solid #cccccc;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);cursor:pointer;*margin-left:.3em;}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;}
393
+.btn:active,.btn.active{background-color:#cccccc \9;}
394
+.btn:first-child{*margin-left:0;}
395
+.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
396
+.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
397
+.btn.active,.btn:active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);background-color:#e6e6e6;background-color:#d9d9d9 \9;outline:0;}
398
+.btn.disabled,.btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
399
+.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
400
+.btn-large [class^="icon-"]{margin-top:1px;}
401
+.btn-small{padding:5px 9px;font-size:11px;line-height:16px;}
402
+.btn-small [class^="icon-"]{margin-top:-1px;}
403
+.btn-mini{padding:2px 6px;font-size:11px;line-height:14px;}
404
+.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);color:#ffffff;}
405
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
406
+.btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;}
407
+.btn-primary:active,.btn-primary.active{background-color:#004099 \9;}
408
+.btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;}
409
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
410
+.btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;}
411
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
412
+.btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;}
413
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
414
+.btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;}
415
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
416
+.btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;}
417
+.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
418
+button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
419
+button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
420
+button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
421
+button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
422
+.btn-group{position:relative;*zoom:1;*margin-left:.3em;}.btn-group:before,.btn-group:after{display:table;content:"";}
423
+.btn-group:after{clear:both;}
424
+.btn-group:first-child{*margin-left:0;}
425
+.btn-group+.btn-group{margin-left:5px;}
426
+.btn-toolbar{margin-top:9px;margin-bottom:9px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
427
+.btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
428
+.btn-group .btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
429
+.btn-group .btn:last-child,.btn-group .dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
430
+.btn-group .btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
431
+.btn-group .btn.large:last-child,.btn-group .large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
432
+.btn-group .btn:hover,.btn-group .btn:focus,.btn-group .btn:active,.btn-group .btn.active{z-index:2;}
433
+.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
434
+.btn-group .dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 1px 0 0 rgba(255, 255, 255, 0.125),inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);*padding-top:3px;*padding-bottom:3px;}
435
+.btn-group .btn-mini.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:1px;*padding-bottom:1px;}
436
+.btn-group .btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px;}
437
+.btn-group .btn-large.dropdown-toggle{padding-left:12px;padding-right:12px;}
438
+.btn-group.open{*z-index:1000;}.btn-group.open .dropdown-menu{display:block;margin-top:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
439
+.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 6px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);}
440
+.btn .caret{margin-top:7px;margin-left:0;}
441
+.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100);}
442
+.btn-mini .caret{margin-top:5px;}
443
+.btn-small .caret{margin-top:6px;}
444
+.btn-large .caret{margin-top:6px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
445
+.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:0.75;filter:alpha(opacity=75);}
446
+.alert{padding:8px 35px 8px 14px;margin-bottom:18px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#c09853;}
447
+.alert-heading{color:inherit;}
448
+.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
449
+.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
450
+.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
451
+.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
452
+.alert-block{padding-top:14px;padding-bottom:14px;}
453
+.alert-block>p,.alert-block>ul{margin-bottom:0;}
454
+.alert-block p+p{margin-top:5px;}
455
+.nav{margin-left:0;margin-bottom:18px;list-style:none;}
456
+.nav>li>a{display:block;}
457
+.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
458
+.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
459
+.nav li+.nav-header{margin-top:9px;}
460
+.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
461
+.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
462
+.nav-list>li>a{padding:3px 15px;}
463
+.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
464
+.nav-list [class^="icon-"]{margin-right:2px;}
465
+.nav-list .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;*width:100%;*margin:-5px 0 5px;}
466
+.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";}
467
+.nav-tabs:after,.nav-pills:after{clear:both;}
468
+.nav-tabs>li,.nav-pills>li{float:left;}
469
+.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
470
+.nav-tabs{border-bottom:1px solid #ddd;}
471
+.nav-tabs>li{margin-bottom:-1px;}
472
+.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
473
+.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
474
+.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
475
+.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;}
476
+.nav-stacked>li{float:none;}
477
+.nav-stacked>li>a{margin-right:0;}
478
+.nav-tabs.nav-stacked{border-bottom:0;}
479
+.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
480
+.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
481
+.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
482
+.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
483
+.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
484
+.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
485
+.nav-tabs .dropdown-menu,.nav-pills .dropdown-menu{margin-top:1px;border-width:1px;}
486
+.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
487
+.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
488
+.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;}
489
+.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333333;border-bottom-color:#333333;}
490
+.nav>.dropdown.active>a:hover{color:#000000;cursor:pointer;}
491
+.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
492
+.nav .open .caret,.nav .open.active .caret,.nav .open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
493
+.tabs-stacked .open>a:hover{border-color:#999999;}
494
+.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";}
495
+.tabbable:after{clear:both;}
496
+.tab-content{display:table;width:100%;}
497
+.tabs-below .nav-tabs,.tabs-right .nav-tabs,.tabs-left .nav-tabs{border-bottom:0;}
498
+.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
499
+.tab-content>.active,.pill-content>.active{display:block;}
500
+.tabs-below .nav-tabs{border-top:1px solid #ddd;}
501
+.tabs-below .nav-tabs>li{margin-top:-1px;margin-bottom:0;}
502
+.tabs-below .nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below .nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
503
+.tabs-below .nav-tabs .active>a,.tabs-below .nav-tabs .active>a:hover{border-color:transparent #ddd #ddd #ddd;}
504
+.tabs-left .nav-tabs>li,.tabs-right .nav-tabs>li{float:none;}
505
+.tabs-left .nav-tabs>li>a,.tabs-right .nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
506
+.tabs-left .nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
507
+.tabs-left .nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
508
+.tabs-left .nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
509
+.tabs-left .nav-tabs .active>a,.tabs-left .nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
510
+.tabs-right .nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
511
+.tabs-right .nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
512
+.tabs-right .nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
513
+.tabs-right .nav-tabs .active>a,.tabs-right .nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
514
+.navbar{*position:relative;*z-index:2;overflow:visible;margin-bottom:18px;}
515
+.navbar-inner{padding-left:20px;padding-right:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
516
+.navbar .container{width:auto;}
517
+.btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.1),0 1px 0 rgba(255, 255, 255, 0.075);}.btn-navbar:hover,.btn-navbar:active,.btn-navbar.active,.btn-navbar.disabled,.btn-navbar[disabled]{background-color:#222222;}
518
+.btn-navbar:active,.btn-navbar.active{background-color:#080808 \9;}
519
+.btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
520
+.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
521
+.nav-collapse.collapse{height:auto;}
522
+.navbar{color:#999999;}.navbar .brand:hover{text-decoration:none;}
523
+.navbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#ffffff;}
524
+.navbar .navbar-text{margin-bottom:0;line-height:40px;}
525
+.navbar .btn,.navbar .btn-group{margin-top:5px;}
526
+.navbar .btn-group .btn{margin-top:0;}
527
+.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";}
528
+.navbar-form:after{clear:both;}
529
+.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
530
+.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0;}
531
+.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
532
+.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
533
+.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0;}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#ffffff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.navbar-search .search-query:-moz-placeholder{color:#cccccc;}
534
+.navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
535
+.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
536
+.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
537
+.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
538
+.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
539
+.navbar-fixed-top{top:0;}
540
+.navbar-fixed-bottom{bottom:0;}
541
+.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
542
+.navbar .nav.pull-right{float:right;}
543
+.navbar .nav>li{display:block;float:left;}
544
+.navbar .nav>li>a{float:none;padding:10px 10px 11px;line-height:19px;color:#999999;text-decoration:none;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
545
+.navbar .nav>li>a:hover{background-color:transparent;color:#ffffff;text-decoration:none;}
546
+.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#ffffff;text-decoration:none;background-color:#222222;}
547
+.navbar .divider-vertical{height:40px;width:1px;margin:0 9px;overflow:hidden;background-color:#222222;border-right:1px solid #333333;}
548
+.navbar .nav.pull-right{margin-left:10px;margin-right:0;}
549
+.navbar .dropdown-menu{margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.navbar .dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
550
+.navbar .dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
551
+.navbar-fixed-bottom .dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
552
+.navbar-fixed-bottom .dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
553
+.navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
554
+.navbar .nav .active .caret{opacity:1;filter:alpha(opacity=100);}
555
+.navbar .nav .open>.dropdown-toggle,.navbar .nav .active>.dropdown-toggle,.navbar .nav .open.active>.dropdown-toggle{background-color:transparent;}
556
+.navbar .nav .active>.dropdown-toggle:hover{color:#ffffff;}
557
+.navbar .nav.pull-right .dropdown-menu,.navbar .nav .dropdown-menu.pull-right{left:auto;right:0;}.navbar .nav.pull-right .dropdown-menu:before,.navbar .nav .dropdown-menu.pull-right:before{left:auto;right:12px;}
558
+.navbar .nav.pull-right .dropdown-menu:after,.navbar .nav .dropdown-menu.pull-right:after{left:auto;right:13px;}
559
+.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}
560
+.breadcrumb .divider{padding:0 5px;color:#999999;}
561
+.breadcrumb .active a{color:#333333;}
562
+.pagination{height:36px;margin:18px 0;}
563
+.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
564
+.pagination li{display:inline;}
565
+.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0;}
566
+.pagination a:hover,.pagination .active a{background-color:#f5f5f5;}
567
+.pagination .active a{color:#999999;cursor:default;}
568
+.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999999;background-color:transparent;cursor:default;}
569
+.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
570
+.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
571
+.pagination-centered{text-align:center;}
572
+.pagination-right{text-align:right;}
573
+.pager{margin-left:0;margin-bottom:18px;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";}
574
+.pager:after{clear:both;}
575
+.pager li{display:inline;}
576
+.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
577
+.pager a:hover{text-decoration:none;background-color:#f5f5f5;}
578
+.pager .next a{float:right;}
579
+.pager .previous a{float:left;}
580
+.pager .disabled a,.pager .disabled a:hover{color:#999999;background-color:#fff;cursor:default;}
581
+.modal-open .dropdown-menu{z-index:2050;}
582
+.modal-open .dropdown.open{*z-index:2050;}
583
+.modal-open .popover{z-index:2060;}
584
+.modal-open .tooltip{z-index:2070;}
585
+.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
586
+.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
587
+.modal{position:fixed;top:50%;left:50%;z-index:1050;overflow:auto;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
588
+.modal.fade.in{top:50%;}
589
+.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
590
+.modal-body{overflow-y:auto;max-height:400px;padding:15px;}
591
+.modal-form{margin-bottom:0;}
592
+.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";}
593
+.modal-footer:after{clear:both;}
594
+.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
595
+.modal-footer .btn-group .btn+.btn{margin-left:-1px;}
596
+.tooltip{position:absolute;z-index:1020;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
597
+.tooltip.top{margin-top:-2px;}
598
+.tooltip.right{margin-left:2px;}
599
+.tooltip.bottom{margin-top:2px;}
600
+.tooltip.left{margin-left:-2px;}
601
+.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
602
+.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
603
+.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
604
+.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
605
+.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
606
+.tooltip-arrow{position:absolute;width:0;height:0;}
607
+.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px;}.popover.top{margin-top:-5px;}
608
+.popover.right{margin-left:5px;}
609
+.popover.bottom{margin-top:5px;}
610
+.popover.left{margin-left:-5px;}
611
+.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
612
+.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
613
+.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
614
+.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
615
+.popover .arrow{position:absolute;width:0;height:0;}
616
+.popover-inner{padding:3px;width:280px;overflow:hidden;background:#000000;background:rgba(0, 0, 0, 0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
617
+.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}
618
+.popover-content{padding:14px;background-color:#ffffff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;}
619
+.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";}
620
+.thumbnails:after{clear:both;}
621
+.thumbnails>li{float:left;margin:0 0 18px 20px;}
622
+.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}
623
+a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
624
+.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
625
+.thumbnail .caption{padding:9px;}
626
+.label{padding:1px 4px 2px;font-size:10.998px;font-weight:bold;line-height:13px;color:#ffffff;vertical-align:middle;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
627
+.label:hover{color:#ffffff;text-decoration:none;}
628
+.label-important{background-color:#b94a48;}
629
+.label-important:hover{background-color:#953b39;}
630
+.label-warning{background-color:#f89406;}
631
+.label-warning:hover{background-color:#c67605;}
632
+.label-success{background-color:#468847;}
633
+.label-success:hover{background-color:#356635;}
634
+.label-info{background-color:#3a87ad;}
635
+.label-info:hover{background-color:#2d6987;}
636
+.label-inverse{background-color:#333333;}
637
+.label-inverse:hover{background-color:#1a1a1a;}
638
+.badge{padding:1px 9px 2px;font-size:12.025px;font-weight:bold;white-space:nowrap;color:#ffffff;background-color:#999999;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
639
+.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
640
+.badge-error{background-color:#b94a48;}
641
+.badge-error:hover{background-color:#953b39;}
642
+.badge-warning{background-color:#f89406;}
643
+.badge-warning:hover{background-color:#c67605;}
644
+.badge-success{background-color:#468847;}
645
+.badge-success:hover{background-color:#356635;}
646
+.badge-info{background-color:#3a87ad;}
647
+.badge-info:hover{background-color:#2d6987;}
648
+.badge-inverse{background-color:#333333;}
649
+.badge-inverse:hover{background-color:#1a1a1a;}
650
+@-webkit-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}.progress{overflow:hidden;height:18px;margin-bottom:18px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-ms-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(top, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
651
+.progress .bar{width:0%;height:18px;color:#ffffff;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-ms-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(top, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-ms-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
652
+.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
653
+.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
654
+.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);}
655
+.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
656
+.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);}
657
+.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
658
+.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);}
659
+.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
660
+.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);}
661
+.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
662
+.accordion{margin-bottom:18px;}
663
+.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
664
+.accordion-heading{border-bottom:0;}
665
+.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
666
+.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
667
+.carousel{position:relative;margin-bottom:18px;line-height:1;}
668
+.carousel-inner{overflow:hidden;width:100%;position:relative;}
669
+.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-ms-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}
670
+.carousel .item>img{display:block;line-height:1;}
671
+.carousel .active,.carousel .next,.carousel .prev{display:block;}
672
+.carousel .active{left:0;}
673
+.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;}
674
+.carousel .next{left:100%;}
675
+.carousel .prev{left:-100%;}
676
+.carousel .next.left,.carousel .prev.right{left:0;}
677
+.carousel .active.left{left:-100%;}
678
+.carousel .active.right{left:100%;}
679
+.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
680
+.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
681
+.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:10px 15px 5px;background:#333333;background:rgba(0, 0, 0, 0.75);}
682
+.carousel-caption h4,.carousel-caption p{color:#ffffff;}
683
+.hero-unit{padding:60px;margin-bottom:30px;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
684
+.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit;}
685
+.pull-right{float:right;}
686
+.pull-left{float:left;}
687
+.hide{display:none;}
688
+.show{display:block;}
689
+.invisible{visibility:hidden;}

BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/img/.DS_Store View File


BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/img/glyphicons-halflings.png View File


BIN
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/.DS_Store View File


File diff suppressed because it is too large
+ 1726 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/bootstrap.js


File diff suppressed because it is too large
+ 6 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/bootstrap.min.js


File diff suppressed because it is too large
+ 4 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/jquery-1.7.1.min.js


File diff suppressed because it is too large
+ 9463 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js


+ 260 - 0
pboard/pboard/public/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.min.js View File

@@ -0,0 +1,260 @@
1
+/*
2
+ wysihtml5 v0.3.0_rc2
3
+ https://github.com/xing/wysihtml5
4
+
5
+ Author: Christopher Blum (https://github.com/tiff)
6
+
7
+ Copyright (C) 2012 XING AG
8
+ Licensed under the MIT license (MIT)
9
+
10
+ Rangy, a cross-browser JavaScript range and selection library
11
+ http://code.google.com/p/rangy/
12
+
13
+ Copyright 2011, Tim Down
14
+ Licensed under the MIT license.
15
+ Version: 1.2.2
16
+ Build date: 13 November 2011
17
+*/
18
+var wysihtml5={version:"0.3.0_rc2",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,DELETE_KEY:46};
19
+window.rangy=function(){function b(a,b){var c=typeof a[b];return c==k||!!(c==g&&a[b])||"unknown"==c}function c(a,b){return!!(typeof a[b]==g&&a[b])}function a(a,b){return typeof a[b]!=j}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&m(a,r)&&x(a,p)}function f(a){window.alert("Rangy not supported in your browser. Reason: "+a);o.initialized=!0;o.supported=!1}function h(){if(!o.initialized){var a,d=!1,g=!1;b(document,"createRange")&&
20
+(a=document.createRange(),m(a,n)&&x(a,q)&&(d=!0),a.detach());if((a=c(document,"body")?document.body:document.getElementsByTagName("body")[0])&&b(a,"createTextRange"))a=a.createTextRange(),e(a)&&(g=!0);!d&&!g&&f("Neither Range nor TextRange are implemented");o.initialized=!0;o.features={implementsDomRange:d,implementsTextRange:g};d=w.concat(z);g=0;for(a=d.length;g<a;++g)try{d[g](o)}catch(j){c(window,"console")&&b(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",
21
+j)}}}function i(a){this.name=a;this.supported=this.initialized=!1}var g="object",k="function",j="undefined",q="startContainer,startOffset,endContainer,endOffset,collapsed,commonAncestorContainer,START_TO_START,START_TO_END,END_TO_START,END_TO_END".split(","),n="setStart,setStartBefore,setStartAfter,setEnd,setEndBefore,setEndAfter,collapse,selectNode,selectNodeContents,compareBoundaryPoints,deleteContents,extractContents,cloneContents,insertNode,surroundContents,cloneRange,toString,detach".split(","),
22
+p="boundingHeight,boundingLeft,boundingTop,boundingWidth,htmlText,text".split(","),r="collapse,compareEndPoints,duplicate,getBookmark,moveToBookmark,moveToElementText,parentElement,pasteHTML,select,setEndPoint,getBoundingClientRect".split(","),m=d(b),s=d(c),x=d(a),o={version:"1.2.2",initialized:!1,supported:!0,util:{isHostMethod:b,isHostObject:c,isHostProperty:a,areHostMethods:m,areHostObjects:s,areHostProperties:x,isTextRange:e},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};
23
+o.fail=f;o.warn=function(a){a="Rangy warning: "+a;o.config.alertOnWarn?window.alert(a):typeof window.console!=j&&typeof window.console.log!=j&&window.console.log(a)};({}).hasOwnProperty?o.util.extend=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}:f("hasOwnProperty not supported");var z=[],w=[];o.init=h;o.addInitListener=function(a){o.initialized?a(o):z.push(a)};var y=[];o.addCreateMissingNativeApiListener=function(a){y.push(a)};o.createMissingNativeApi=function(a){a=a||window;h();
24
+for(var b=0,c=y.length;b<c;++b)y[b](a)};i.prototype.fail=function(a){this.initialized=!0;this.supported=!1;throw Error("Module '"+this.name+"' failed to load: "+a);};i.prototype.warn=function(a){o.warn("Module "+this.name+": "+a)};i.prototype.createError=function(a){return Error("Error in Rangy "+this.name+" module: "+a)};o.createModule=function(a,b){var c=new i(a);o.modules[a]=c;w.push(function(a){b(a,c);c.initialized=!0;c.supported=!0})};o.requireModules=function(a){for(var b=0,c=a.length,d,g;b<
25
+c;++b){g=a[b];d=o.modules[g];if(!d||!(d instanceof i))throw Error("Module '"+g+"' not found");if(!d.supported)throw Error("Module '"+g+"' not supported");}};var A=!1,s=function(){A||(A=!0,o.initialized||h())};if(typeof window==j)f("No window found");else if(typeof document==j)f("No document found");else return b(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",s,!1),b(window,"addEventListener")?window.addEventListener("load",s,!1):b(window,"attachEvent")?window.attachEvent("onload",
26
+s):f("Window does not have required addEventListener or attachEvent method"),o}();
27
+rangy.createModule("DomUtil",function(b,c){function a(a){for(var b=0;a=a.previousSibling;)b++;return b}function d(a,b){var c=[],d;for(d=a;d;d=d.parentNode)c.push(d);for(d=b;d;d=d.parentNode)if(m(c,d))return d;return null}function e(a,b,c){for(c=c?a:a.parentNode;c;){a=c.parentNode;if(a===b)return c;c=a}return null}function f(a){a=a.nodeType;return 3==a||4==a||8==a}function h(a,b){var c=b.nextSibling,d=b.parentNode;c?d.insertBefore(a,c):d.appendChild(a);return a}function i(a){if(9==a.nodeType)return a;
28
+if(typeof a.ownerDocument!=n)return a.ownerDocument;if(typeof a.document!=n)return a.document;if(a.parentNode)return i(a.parentNode);throw Error("getDocument: no document found for node");}function g(a){return!a?"[No node]":f(a)?'"'+a.data+'"':1==a.nodeType?"<"+a.nodeName+(a.id?' id="'+a.id+'"':"")+">["+a.childNodes.length+"]":a.nodeName}function k(a){this._next=this.root=a}function j(a,b){this.node=a;this.offset=b}function q(a){this.code=this[a];this.codeName=a;this.message="DOMException: "+this.codeName}
29
+var n="undefined",p=b.util;p.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||c.fail("document missing a Node creation method");p.isHostMethod(document,"getElementsByTagName")||c.fail("document missing getElementsByTagName method");var r=document.createElement("div");p.areHostMethods(r,["insertBefore","appendChild","cloneNode"])||c.fail("Incomplete Element implementation");p.isHostProperty(r,"innerHTML")||c.fail("Element is missing innerHTML property");r=document.createTextNode("test");
30
+p.areHostMethods(r,["splitText","deleteData","insertData","appendData","cloneNode"])||c.fail("Incomplete Text Node implementation");var m=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1};k.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next,b;if(this._current){b=a.firstChild;if(!b)for(b=null;a!==this.root&&!(b=a.nextSibling);)a=a.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=
31
+null}};j.prototype={equals:function(a){return this.node===a.node&this.offset==a.offset},inspect:function(){return"[DomPosition("+g(this.node)+":"+this.offset+")]"}};q.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11};q.prototype.toString=function(){return this.message};b.dom={arrayContains:m,isHtmlNamespace:function(a){var b;return typeof a.namespaceURI==n||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==
32
+b},parentElement:function(a){a=a.parentNode;return 1==a.nodeType?a:null},getNodeIndex:a,getNodeLength:function(a){var b;return f(a)?a.length:(b=a.childNodes)?b.length:0},getCommonAncestor:d,isAncestorOf:function(a,b,c){for(b=c?b:b.parentNode;b;){if(b===a)return!0;b=b.parentNode}return!1},getClosestAncestorIn:e,isCharacterDataNode:f,insertAfter:h,splitDataNode:function(a,b){var c=a.cloneNode(!1);c.deleteData(0,b);a.deleteData(b,a.length-b);h(c,a);return c},getDocument:i,getWindow:function(a){a=i(a);
33
+if(typeof a.defaultView!=n)return a.defaultView;if(typeof a.parentWindow!=n)return a.parentWindow;throw Error("Cannot get a window object for node");},getIframeWindow:function(a){if(typeof a.contentWindow!=n)return a.contentWindow;if(typeof a.contentDocument!=n)return a.contentDocument.defaultView;throw Error("getIframeWindow: No Window object found for iframe element");},getIframeDocument:function(a){if(typeof a.contentDocument!=n)return a.contentDocument;if(typeof a.contentWindow!=n)return a.contentWindow.document;
34
+throw Error("getIframeWindow: No Document object found for iframe element");},getBody:function(a){return p.isHostObject(a,"body")?a.body:a.getElementsByTagName("body")[0]},getRootContainer:function(a){for(var b;b=a.parentNode;)a=b;return a},comparePoints:function(b,c,g,j){var k;if(b==g)return c===j?0:c<j?-1:1;if(k=e(g,b,!0))return c<=a(k)?-1:1;if(k=e(b,g,!0))return a(k)<j?-1:1;c=d(b,g);b=b===c?c:e(b,c,!0);g=g===c?c:e(g,c,!0);if(b===g)throw Error("comparePoints got to case 4 and childA and childB are the same!");
35
+for(c=c.firstChild;c;){if(c===b)return-1;if(c===g)return 1;c=c.nextSibling}throw Error("Should not be here!");},inspectNode:g,fragmentFromNodeChildren:function(a){for(var b=i(a).createDocumentFragment(),c;c=a.firstChild;)b.appendChild(c);return b},createIterator:function(a){return new k(a)},DomPosition:j};b.DOMException=q});
36
+rangy.createModule("DomRange",function(b){function c(a,b){return 3!=a.nodeType&&(l.isAncestorOf(a,b.startContainer,!0)||l.isAncestorOf(a,b.endContainer,!0))}function a(a){return l.getDocument(a.startContainer)}function d(a,b,c){if(b=a._listeners[b])for(var d=0,g=b.length;d<g;++d)b[d].call(a,{target:a,args:c})}function e(a){return new u(a.parentNode,l.getNodeIndex(a))}function f(a){return new u(a.parentNode,l.getNodeIndex(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;l.isCharacterDataNode(b)?
37
+c==b.length?l.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:l.splitDataNode(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]);return d}function i(b){for(var c,d,g=a(b.range).createDocumentFragment();d=b.next();){c=b.isPartiallySelectedSubtree();d=d.cloneNode(!c);c&&(c=b.getSubtreeIterator(),d.appendChild(i(c)),c.detach(!0));if(10==d.nodeType)throw new B("HIERARCHY_REQUEST_ERR");g.appendChild(d)}return g}function g(a,b,c){for(var d,e,c=c||{stop:!1};d=a.next();)if(a.isPartiallySelectedSubtree())if(!1===
38
+b(d)){c.stop=!0;break}else{if(d=a.getSubtreeIterator(),g(d,b,c),d.detach(!0),c.stop)break}else for(d=l.createIterator(d);e=d.next();)if(!1===b(e)){c.stop=!0;return}}function k(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),k(b),b.detach(!0)):a.remove()}function j(b){for(var c,d=a(b.range).createDocumentFragment(),g;c=b.next();){b.isPartiallySelectedSubtree()?(c=c.cloneNode(!1),g=b.getSubtreeIterator(),c.appendChild(j(g)),g.detach(!0)):b.remove();if(10==c.nodeType)throw new B("HIERARCHY_REQUEST_ERR");
39
+d.appendChild(c)}return d}function q(a,b,c){var d=!(!b||!b.length),e,j=!!c;d&&(e=RegExp("^("+b.join("|")+")$"));var k=[];g(new p(a,!1),function(a){(!d||e.test(a.nodeType))&&(!j||c(a))&&k.push(a)});return k}function n(a){return"["+("undefined"==typeof a.getName?"Range":a.getName())+"("+l.inspectNode(a.startContainer)+":"+a.startOffset+", "+l.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){this.range=a;this.clonePartiallySelectedTextNodes=b;if(!a.collapsed){this.sc=a.startContainer;
40
+this.so=a.startOffset;this.ec=a.endContainer;this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&l.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===c&&!l.isCharacterDataNode(this.sc)?this.sc.childNodes[this.so]:l.getClosestAncestorIn(this.sc,c,!0),this._last=this.ec===c&&!l.isCharacterDataNode(this.ec)?this.ec.childNodes[this.eo-1]:l.getClosestAncestorIn(this.ec,c,!0))}}function r(a){this.code=
41
+this[a];this.codeName=a;this.message="RangeException: "+this.codeName}function m(a,b,c){this.nodes=q(a,b,c);this._next=this.nodes[0];this._position=0}function s(a){return function(b,c){for(var d,g=c?b:b.parentNode;g;){d=g.nodeType;if(l.arrayContains(a,d))return g;g=g.parentNode}return null}}function x(a,b){if($(a,b))throw new r("INVALID_NODE_TYPE_ERR");}function o(a){if(!a.startContainer)throw new B("INVALID_STATE_ERR");}function z(a,b){if(!l.arrayContains(b,a.nodeType))throw new r("INVALID_NODE_TYPE_ERR");
42
+}function w(a,b){if(0>b||b>(l.isCharacterDataNode(a)?a.length:a.childNodes.length))throw new B("INDEX_SIZE_ERR");}function y(a,b){if(O(a,!0)!==O(b,!0))throw new B("WRONG_DOCUMENT_ERR");}function A(a){if(aa(a,!0))throw new B("NO_MODIFICATION_ALLOWED_ERR");}function t(a,b){if(!a)throw new B(b);}function v(a){o(a);if(!l.arrayContains(G,a.startContainer.nodeType)&&!O(a.startContainer,!0)||!l.arrayContains(G,a.endContainer.nodeType)&&!O(a.endContainer,!0)||!(a.startOffset<=(l.isCharacterDataNode(a.startContainer)?
43
+a.startContainer.length:a.startContainer.childNodes.length))||!(a.endOffset<=(l.isCharacterDataNode(a.endContainer)?a.endContainer.length:a.endContainer.childNodes.length)))throw Error("Range error: Range is no longer valid after DOM mutation ("+a.inspect()+")");}function D(){}function K(a){a.START_TO_START=Q;a.START_TO_END=U;a.END_TO_END=ba;a.END_TO_START=V;a.NODE_BEFORE=W;a.NODE_AFTER=X;a.NODE_BEFORE_AND_AFTER=Y;a.NODE_INSIDE=R}function F(a){K(a);K(a.prototype)}function E(a,b){return function(){v(this);
44
+var c=this.startContainer,d=this.startOffset,e=this.commonAncestorContainer,j=new p(this,!0);c!==e&&(c=l.getClosestAncestorIn(c,e,!0),d=f(c),c=d.node,d=d.offset);g(j,A);j.reset();e=a(j);j.detach();b(this,c,d,c,d);return e}}function I(a,d,g){function h(a,b){return function(c){o(this);z(c,L);z(M(c),G);c=(a?e:f)(c);(b?i:n)(this,c.node,c.offset)}}function i(a,b,c){var g=a.endContainer,e=a.endOffset;if(b!==a.startContainer||c!==a.startOffset){if(M(b)!=M(g)||1==l.comparePoints(b,c,g,e))g=b,e=c;d(a,b,c,
45
+g,e)}}function n(a,b,c){var g=a.startContainer,e=a.startOffset;if(b!==a.endContainer||c!==a.endOffset){if(M(b)!=M(g)||-1==l.comparePoints(b,c,g,e))g=b,e=c;d(a,g,e,b,c)}}a.prototype=new D;b.util.extend(a.prototype,{setStart:function(a,b){o(this);x(a,!0);w(a,b);i(this,a,b)},setEnd:function(a,b){o(this);x(a,!0);w(a,b);n(this,a,b)},setStartBefore:h(!0,!0),setStartAfter:h(!1,!0),setEndBefore:h(!0,!1),setEndAfter:h(!1,!1),collapse:function(a){v(this);a?d(this,this.startContainer,this.startOffset,this.startContainer,
46
+this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){o(this);x(a,!0);d(this,a,0,a,l.getNodeLength(a))},selectNode:function(a){o(this);x(a,!1);z(a,L);var b=e(a),a=f(a);d(this,b.node,b.offset,a.node,a.offset)},extractContents:E(j,d),deleteContents:E(k,d),canSurroundContents:function(){v(this);A(this.startContainer);A(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);a.detach();return!b},
47
+detach:function(){g(this)},splitBoundaries:function(){v(this);var a=this.startContainer,b=this.startOffset,c=this.endContainer,g=this.endOffset,e=a===c;l.isCharacterDataNode(c)&&0<g&&g<c.length&&l.splitDataNode(c,g);l.isCharacterDataNode(a)&&0<b&&b<a.length&&(a=l.splitDataNode(a,b),e?(g-=b,c=a):c==a.parentNode&&g>=l.getNodeIndex(a)&&g++,b=0);d(this,a,b,c,g)},normalizeBoundaries:function(){v(this);var a=this.startContainer,b=this.startOffset,c=this.endContainer,g=this.endOffset,e=function(a){var b=
48
+a.nextSibling;b&&b.nodeType==a.nodeType&&(c=a,g=a.length,a.appendData(b.data),b.parentNode.removeChild(b))},j=function(d){var e=d.previousSibling;if(e&&e.nodeType==d.nodeType){a=d;var j=d.length;b=e.length;d.insertData(0,e.data);e.parentNode.removeChild(e);a==c?(g+=b,c=a):c==d.parentNode&&(e=l.getNodeIndex(d),g==e?(c=d,g=j):g>e&&g--)}},k=!0;l.isCharacterDataNode(c)?c.length==g&&e(c):(0<g&&(k=c.childNodes[g-1])&&l.isCharacterDataNode(k)&&e(k),k=!this.collapsed);k?l.isCharacterDataNode(a)?0==b&&j(a):
49
+b<a.childNodes.length&&(e=a.childNodes[b])&&l.isCharacterDataNode(e)&&j(e):(a=c,b=g);d(this,a,b,c,g)},collapseToPoint:function(a,b){o(this);x(a,!0);w(a,b);(a!==this.startContainer||b!==this.startOffset||a!==this.endContainer||b!==this.endOffset)&&d(this,a,b,a,b)}});F(a)}function N(a){a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset;a.commonAncestorContainer=a.collapsed?a.startContainer:l.getCommonAncestor(a.startContainer,a.endContainer)}function J(a,b,c,g,e){var j=a.startContainer!==
50
+b||a.startOffset!==c,k=a.endContainer!==g||a.endOffset!==e;a.startContainer=b;a.startOffset=c;a.endContainer=g;a.endOffset=e;N(a);d(a,"boundarychange",{startMoved:j,endMoved:k})}function C(a){this.startContainer=a;this.startOffset=0;this.endContainer=a;this.endOffset=0;this._listeners={boundarychange:[],detach:[]};N(this)}b.requireModules(["DomUtil"]);var l=b.dom,u=l.DomPosition,B=b.DOMException;p.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=
51
+null;this._next=this._first},hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next;a&&(this._next=a!==this._last?a.nextSibling:null,l.isCharacterDataNode(a)&&this.clonePartiallySelectedTextNodes&&(a===this.ec&&(a=a.cloneNode(!0)).deleteData(this.eo,a.length-this.eo),this._current===this.sc&&(a=a.cloneNode(!0)).deleteData(0,this.so)));return a},remove:function(){var a=this._current,b,c;l.isCharacterDataNode(a)&&(a===this.sc||a===this.ec)?(b=a===this.sc?this.so:0,c=a===
52
+this.ec?this.eo:a.length,b!=c&&a.deleteData(b,c-b)):a.parentNode&&a.parentNode.removeChild(a)},isPartiallySelectedSubtree:function(){return c(this._current,this.range)},getSubtreeIterator:function(){var b;if(this.isSingleCharacterDataNode)b=this.range.cloneRange(),b.collapse();else{b=new C(a(this.range));var c=this._current,d=c,g=0,e=c,j=l.getNodeLength(c);l.isAncestorOf(c,this.sc,!0)&&(d=this.sc,g=this.so);l.isAncestorOf(c,this.ec,!0)&&(e=this.ec,j=this.eo);J(b,d,g,e,j)}return new p(b,this.clonePartiallySelectedTextNodes)},
53
+detach:function(a){a&&this.range.detach();this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};r.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2};r.prototype.toString=function(){return this.message};m.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){this._current=this._next;this._next=this.nodes[++this._position];return this._current},detach:function(){this._current=this._next=this.nodes=null}};var L=[1,3,4,5,
54
+7,8,10],G=[2,9,11],P=[1,3,4,5,7,8,10,11],H=[1,3,4,5,7,8],M=l.getRootContainer,O=s([9,11]),aa=s([5,6,10,12]),$=s([6,10,12]),Z=document.createElement("style"),S=!1;try{Z.innerHTML="<b>x</b>",S=3==Z.firstChild.nodeType}catch(ca){}b.features.htmlParsingConforms=S;var T="startContainer,startOffset,endContainer,endOffset,collapsed,commonAncestorContainer".split(","),Q=0,U=1,ba=2,V=3,W=0,X=1,Y=2,R=3;D.prototype={attachListener:function(a,b){this._listeners[a].push(b)},compareBoundaryPoints:function(a,b){v(this);
55
+y(this.startContainer,b.startContainer);var c=a==V||a==Q?"start":"end",d=a==U||a==Q?"start":"end";return l.comparePoints(this[c+"Container"],this[c+"Offset"],b[d+"Container"],b[d+"Offset"])},insertNode:function(a){v(this);z(a,P);A(this.startContainer);if(l.isAncestorOf(a,this.startContainer,!0))throw new B("HIERARCHY_REQUEST_ERR");this.setStartBefore(h(a,this.startContainer,this.startOffset))},cloneContents:function(){v(this);var b,c;if(this.collapsed)return a(this).createDocumentFragment();if(this.startContainer===
56
+this.endContainer&&l.isCharacterDataNode(this.startContainer))return b=this.startContainer.cloneNode(!0),b.data=b.data.slice(this.startOffset,this.endOffset),c=a(this).createDocumentFragment(),c.appendChild(b),c;c=new p(this,!0);b=i(c);c.detach();return b},canSurroundContents:function(){v(this);A(this.startContainer);A(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);a.detach();return!b},surroundContents:function(a){z(a,H);if(!this.canSurroundContents())throw new r("BAD_BOUNDARYPOINTS_ERR");
57
+var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset);a.appendChild(b);this.selectNode(a)},cloneRange:function(){v(this);for(var b=new C(a(this)),c=T.length,d;c--;)d=T[c],b[d]=this[d];return b},toString:function(){v(this);var a=this.startContainer;if(a===this.endContainer&&l.isCharacterDataNode(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],a=new p(this,!0);g(a,function(a){(3==
58
+a.nodeType||4==a.nodeType)&&b.push(a.data)});a.detach();return b.join("")},compareNode:function(a){v(this);var b=a.parentNode,c=l.getNodeIndex(a);if(!b)throw new B("NOT_FOUND_ERR");a=this.comparePoint(b,c);b=this.comparePoint(b,c+1);return 0>a?0<b?Y:W:0<b?X:R},comparePoint:function(a,b){v(this);t(a,"HIERARCHY_REQUEST_ERR");y(a,this.startContainer);return 0>l.comparePoints(a,b,this.startContainer,this.startOffset)?-1:0<l.comparePoints(a,b,this.endContainer,this.endOffset)?1:0},createContextualFragment:S?
59
+function(a){var b=this.startContainer,c=l.getDocument(b);if(!b)throw new B("INVALID_STATE_ERR");var d=null;1==b.nodeType?d=b:l.isCharacterDataNode(b)&&(d=l.parentElement(b));d=null===d||"HTML"==d.nodeName&&l.isHtmlNamespace(l.getDocument(d).documentElement)&&l.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1);d.innerHTML=a;return l.fragmentFromNodeChildren(d)}:function(b){o(this);var c=a(this).createElement("body");c.innerHTML=b;return l.fragmentFromNodeChildren(c)},toHtml:function(){v(this);
60
+var b=a(this).createElement("div");b.appendChild(this.cloneContents());return b.innerHTML},intersectsNode:function(b,c){v(this);t(b,"NOT_FOUND_ERR");if(l.getDocument(b)!==a(this))return!1;var d=b.parentNode,g=l.getNodeIndex(b);t(d,"NOT_FOUND_ERR");var e=l.comparePoints(d,g,this.endContainer,this.endOffset),d=l.comparePoints(d,g+1,this.startContainer,this.startOffset);return c?0>=e&&0<=d:0>e&&0<d},isPointInRange:function(a,b){v(this);t(a,"HIERARCHY_REQUEST_ERR");y(a,this.startContainer);return 0<=
61
+l.comparePoints(a,b,this.startContainer,this.startOffset)&&0>=l.comparePoints(a,b,this.endContainer,this.endOffset)},intersectsRange:function(b,c){v(this);if(a(b)!=a(this))throw new B("WRONG_DOCUMENT_ERR");var d=l.comparePoints(this.startContainer,this.startOffset,b.endContainer,b.endOffset),g=l.comparePoints(this.endContainer,this.endOffset,b.startContainer,b.startOffset);return c?0>=d&&0<=g:0>d&&0<g},intersection:function(a){if(this.intersectsRange(a)){var b=l.comparePoints(this.startContainer,
62
+this.startOffset,a.startContainer,a.startOffset),c=l.comparePoints(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();-1==b&&d.setStart(a.startContainer,a.startOffset);1==c&&d.setEnd(a.endContainer,a.endOffset);return d}return null},union:function(a){if(this.intersectsRange(a,!0)){var b=this.cloneRange();-1==l.comparePoints(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset);1==l.comparePoints(a.endContainer,
63
+a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset);return b}throw new r("Ranges do not intersect");},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==R},containsNodeContents:function(a){return 0<=this.comparePoint(a,0)&&0>=this.comparePoint(a,l.getNodeLength(a))},containsRange:function(a){return this.intersection(a).equals(a)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);return 0<c.length?
64
+(b.setStart(c[0],0),a=c.pop(),b.setEnd(a,a.length),a=this.containsRange(b),b.detach(),a):this.containsNodeContents(a)},createNodeIterator:function(a,b){v(this);return new m(this,a,b)},getNodes:function(a,b){v(this);return q(this,a,b)},getDocument:function(){return a(this)},collapseBefore:function(a){o(this);this.setEndBefore(a);this.collapse(!1)},collapseAfter:function(a){o(this);this.setStartAfter(a);this.collapse(!0)},getName:function(){return"DomRange"},equals:function(a){return C.rangesEqual(this,
65
+a)},inspect:function(){return n(this)}};I(C,J,function(a){o(a);a.startContainer=a.startOffset=a.endContainer=a.endOffset=null;a.collapsed=a.commonAncestorContainer=null;d(a,"detach",null);a._listeners=null});b.rangePrototype=D.prototype;C.rangeProperties=T;C.RangeIterator=p;C.copyComparisonConstants=F;C.createPrototypeRange=I;C.inspect=n;C.getRangeDocument=a;C.rangesEqual=function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===
66
+b.endOffset};b.DomRange=C;b.RangeException=r});
67
+rangy.createModule("WrappedRange",function(b){function c(a,b,c,d){var h=a.duplicate();h.collapse(c);var i=h.parentElement();e.isAncestorOf(b,i,!0)||(i=b);if(!i.canHaveHTML)return new f(i.parentNode,e.getNodeIndex(i));var b=e.getDocument(i).createElement("span"),r,m=c?"StartToStart":"StartToEnd";do i.insertBefore(b,b.previousSibling),h.moveToElementText(b);while(0<(r=h.compareEndPoints(m,a))&&b.previousSibling);m=b.nextSibling;if(-1==r&&m&&e.isCharacterDataNode(m)){h.setEndPoint(c?"EndToStart":"EndToEnd",
68
+a);if(/[\r\n]/.test(m.data)){i=h.duplicate();c=i.text.replace(/\r\n/g,"\r").length;for(c=i.moveStart("character",c);-1==i.compareEndPoints("StartToEnd",i);)c++,i.moveStart("character",1)}else c=h.text.length;i=new f(m,c)}else m=(d||!c)&&b.previousSibling,i=(c=(d||c)&&b.nextSibling)&&e.isCharacterDataNode(c)?new f(c,0):m&&e.isCharacterDataNode(m)?new f(m,m.length):new f(i,e.getNodeIndex(b));b.parentNode.removeChild(b);return i}function a(a,b){var c,d,f=a.offset,h=e.getDocument(a.node),i=h.body.createTextRange(),
69
+m=e.isCharacterDataNode(a.node);m?(c=a.node,d=c.parentNode):(c=a.node.childNodes,c=f<c.length?c[f]:null,d=a.node);h=h.createElement("span");h.innerHTML="&#feff;";c?d.insertBefore(h,c):d.appendChild(h);i.moveToElementText(h);i.collapse(!b);d.removeChild(h);if(m)i[b?"moveStart":"moveEnd"]("character",f);return i}b.requireModules(["DomUtil","DomRange"]);var d,e=b.dom,f=e.DomPosition,h=b.DomRange;if(b.features.implementsDomRange&&(!b.features.implementsTextRange||!b.config.preferTextRange))(function(){function a(b){for(var c=
70
+j.length,d;c--;)d=j[c],b[d]=b.nativeRange[d]}var c,j=h.rangeProperties,f;d=function(b){if(!b)throw Error("Range must be specified");this.nativeRange=b;a(this)};h.createPrototypeRange(d,function(a,b,c,d,g){var e=a.endContainer!==d||a.endOffset!=g;if(a.startContainer!==b||a.startOffset!=c||e)a.setEnd(d,g),a.setStart(b,c)},function(a){a.nativeRange.detach();a.detached=!0;for(var b=j.length,c;b--;)c=j[b],a[c]=null});c=d.prototype;c.selectNode=function(b){this.nativeRange.selectNode(b);a(this)};c.deleteContents=
71
+function(){this.nativeRange.deleteContents();a(this)};c.extractContents=function(){var b=this.nativeRange.extractContents();a(this);return b};c.cloneContents=function(){return this.nativeRange.cloneContents()};c.surroundContents=function(b){this.nativeRange.surroundContents(b);a(this)};c.collapse=function(b){this.nativeRange.collapse(b);a(this)};c.cloneRange=function(){return new d(this.nativeRange.cloneRange())};c.refresh=function(){a(this)};c.toString=function(){return this.nativeRange.toString()};
72
+var i=document.createTextNode("test");e.getBody(document).appendChild(i);var p=document.createRange();p.setStart(i,0);p.setEnd(i,0);try{p.setStart(i,1),c.setStart=function(b,c){this.nativeRange.setStart(b,c);a(this)},c.setEnd=function(b,c){this.nativeRange.setEnd(b,c);a(this)},f=function(b){return function(c){this.nativeRange[b](c);a(this)}}}catch(r){c.setStart=function(b,c){try{this.nativeRange.setStart(b,c)}catch(d){this.nativeRange.setEnd(b,c),this.nativeRange.setStart(b,c)}a(this)},c.setEnd=function(b,
73
+c){try{this.nativeRange.setEnd(b,c)}catch(d){this.nativeRange.setStart(b,c),this.nativeRange.setEnd(b,c)}a(this)},f=function(b,c){return function(d){try{this.nativeRange[b](d)}catch(e){this.nativeRange[c](d),this.nativeRange[b](d)}a(this)}}}c.setStartBefore=f("setStartBefore","setEndBefore");c.setStartAfter=f("setStartAfter","setEndAfter");c.setEndBefore=f("setEndBefore","setStartBefore");c.setEndAfter=f("setEndAfter","setStartAfter");p.selectNodeContents(i);c.selectNodeContents=p.startContainer==
74
+i&&p.endContainer==i&&0==p.startOffset&&p.endOffset==i.length?function(b){this.nativeRange.selectNodeContents(b);a(this)}:function(a){this.setStart(a,0);this.setEnd(a,h.getEndOffset(a))};p.selectNodeContents(i);p.setEnd(i,3);f=document.createRange();f.selectNodeContents(i);f.setEnd(i,4);f.setStart(i,2);c.compareBoundaryPoints=-1==p.compareBoundaryPoints(p.START_TO_END,f)&1==p.compareBoundaryPoints(p.END_TO_START,f)?function(a,b){b=b.nativeRange||b;a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&
75
+(a=b.START_TO_END);return this.nativeRange.compareBoundaryPoints(a,b)}:function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};b.util.isHostMethod(p,"createContextualFragment")&&(c.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)});e.getBody(document).removeChild(i);p.detach();f.detach()})(),b.createNativeRange=function(a){return(a||document).createRange()};else if(b.features.implementsTextRange){d=function(a){this.textRange=a;this.refresh()};
76
+d.prototype=new h(document);d.prototype.refresh=function(){var a,b,d=this.textRange;a=d.parentElement();var f=d.duplicate();f.collapse(!0);b=f.parentElement();f=d.duplicate();f.collapse(!1);d=f.parentElement();b=b==d?b:e.getCommonAncestor(b,d);b=b==a?b:e.getCommonAncestor(a,b);0==this.textRange.compareEndPoints("StartToEnd",this.textRange)?b=a=c(this.textRange,b,!0,!0):(a=c(this.textRange,b,!0,!1),b=c(this.textRange,b,!1,!1));this.setStart(a.node,a.offset);this.setEnd(b.node,b.offset)};h.copyComparisonConstants(d);
77
+var i=function(){return this}();"undefined"==typeof i.Range&&(i.Range=d);b.createNativeRange=function(a){return(a||document).body.createTextRange()}}b.features.implementsTextRange&&(d.rangeToTextRange=function(b){if(b.collapsed)return a(new f(b.startContainer,b.startOffset),!0);var c=a(new f(b.startContainer,b.startOffset),!0),d=a(new f(b.endContainer,b.endOffset),!1),b=e.getDocument(b.startContainer).body.createTextRange();b.setEndPoint("StartToStart",c);b.setEndPoint("EndToEnd",d);return b});d.prototype.getName=
78
+function(){return"WrappedRange"};b.WrappedRange=d;b.createRange=function(a){return new d(b.createNativeRange(a||document))};b.createRangyRange=function(a){return new h(a||document)};b.createIframeRange=function(a){return b.createRange(e.getIframeDocument(a))};b.createIframeRangyRange=function(a){return b.createRangyRange(e.getIframeDocument(a))};b.addCreateMissingNativeApiListener(function(a){a=a.document;if(typeof a.createRange=="undefined")a.createRange=function(){return b.createRange(this)};a=
79
+a=null})});
80
+rangy.createModule("WrappedSelection",function(b,c){function a(a){return(a||window).getSelection()}function d(a){return(a||window).document.selection}function e(a,b,c){var d=c?"end":"start",c=c?"start":"end";a.anchorNode=b[d+"Container"];a.anchorOffset=b[d+"Offset"];a.focusNode=b[c+"Container"];a.focusOffset=b[c+"Offset"]}function f(a){a.anchorNode=a.focusNode=null;a.anchorOffset=a.focusOffset=0;a.rangeCount=0;a.isCollapsed=!0;a._ranges.length=0}function h(a){var c;a instanceof x?(c=a._selectionNativeRange,c||
81
+(c=b.createNativeRange(m.getDocument(a.startContainer)),c.setEnd(a.endContainer,a.endOffset),c.setStart(a.startContainer,a.startOffset),a._selectionNativeRange=c,a.attachListener("detach",function(){this._selectionNativeRange=null}))):a instanceof o?c=a.nativeRange:b.features.implementsDomRange&&a instanceof m.getWindow(a.startContainer).Range&&(c=a);return c}function i(a){var b=a.getNodes(),c;a:if(!b.length||1!=b[0].nodeType)c=!1;else{c=1;for(var d=b.length;c<d;++c)if(!m.isAncestorOf(b[0],b[c])){c=
82
+!1;break a}c=!0}if(!c)throw Error("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return b[0]}function g(a,b){var c=new o(b);a._ranges=[c];e(a,c,!1);a.rangeCount=1;a.isCollapsed=c.collapsed}function k(a){a._ranges.length=0;if("None"==a.docSelection.type)f(a);else{var c=a.docSelection.createRange();if(c&&"undefined"!=typeof c.text)g(a,c);else{a.rangeCount=c.length;for(var d,j=m.getDocument(c.item(0)),k=0;k<a.rangeCount;++k)d=b.createRange(j),d.selectNode(c.item(k)),
83
+a._ranges.push(d);a.isCollapsed=1==a.rangeCount&&a._ranges[0].collapsed;e(a,a._ranges[a.rangeCount-1],!1)}}}function j(a,b){for(var c=a.docSelection.createRange(),d=i(b),e=m.getDocument(c.item(0)),e=m.getBody(e).createControlRange(),g=0,j=c.length;g<j;++g)e.add(c.item(g));try{e.add(d)}catch(f){throw Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)");}e.select();k(a)}function q(a,b,c){this.nativeSelection=a;this.docSelection=b;this._ranges=
84
+[];this.win=c;this.refresh()}function n(a,b){for(var c=m.getDocument(b[0].startContainer),c=m.getBody(c).createControlRange(),d=0,e;d<rangeCount;++d){e=i(b[d]);try{c.add(e)}catch(g){throw Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)");}}c.select();k(a)}function p(a,b){if(a.anchorNode&&m.getDocument(a.anchorNode)!==m.getDocument(b))throw new z("WRONG_DOCUMENT_ERR");}function r(a){var b=[],c=new w(a.anchorNode,a.anchorOffset),
85
+d=new w(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var g=0,j=a.rangeCount;g<j;++g)b[g]=x.inspect(a.getRangeAt(g));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}b.requireModules(["DomUtil","DomRange","WrappedRange"]);b.config.checkSelectionRanges=!0;var m=b.dom,s=b.util,x=b.DomRange,o=b.WrappedRange,z=b.DOMException,w=m.DomPosition,y,A,t=b.util.isHostMethod(window,"getSelection"),
86
+v=b.util.isHostObject(document,"selection"),D=v&&(!t||b.config.preferTextRange);D?(y=d,b.isSelectionValid=function(a){var a=(a||window).document,b=a.selection;return"None"!=b.type||m.getDocument(b.createRange().parentElement())==a}):t?(y=a,b.isSelectionValid=function(){return!0}):c.fail("Neither document.selection or window.getSelection() detected.");b.getNativeSelection=y;var t=y(),K=b.createNativeRange(document),F=m.getBody(document),E=s.areHostObjects(t,s.areHostProperties(t,["anchorOffset","focusOffset"]));
87
+b.features.selectionHasAnchorAndFocus=E;var I=s.isHostMethod(t,"extend");b.features.selectionHasExtend=I;var N="number"==typeof t.rangeCount;b.features.selectionHasRangeCount=N;var J=!1,C=!0;s.areHostMethods(t,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeof t.rangeCount&&b.features.implementsDomRange&&function(){var a=document.createElement("iframe");F.appendChild(a);var b=m.getIframeDocument(a);b.open();b.write("<html><head></head><body>12</body></html>");b.close();var c=m.getIframeWindow(a).getSelection(),
88
+d=b.documentElement.lastChild.firstChild,b=b.createRange();b.setStart(d,1);b.collapse(true);c.addRange(b);C=c.rangeCount==1;c.removeAllRanges();var e=b.cloneRange();b.setStart(d,0);e.setEnd(d,2);c.addRange(b);c.addRange(e);J=c.rangeCount==2;b.detach();e.detach();F.removeChild(a)}();b.features.selectionSupportsMultipleRanges=J;b.features.collapsedNonEditableSelectionsSupported=C;var l=!1,u;F&&s.isHostMethod(F,"createControlRange")&&(u=F.createControlRange(),s.areHostProperties(u,["item","add"])&&(l=
89
+!0));b.features.implementsControlRange=l;A=E?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:false};var B;s.isHostMethod(t,"getRangeAt")?B=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:E&&(B=function(a){var c=m.getDocument(a.anchorNode),c=b.createRange(c);c.setStart(a.anchorNode,a.anchorOffset);c.setEnd(a.focusNode,a.focusOffset);if(c.collapsed!==this.isCollapsed){c.setStart(a.focusNode,
90
+a.focusOffset);c.setEnd(a.anchorNode,a.anchorOffset)}return c});b.getSelection=function(a){var a=a||window,b=a._rangySelection,c=y(a),e=v?d(a):null;if(b){b.nativeSelection=c;b.docSelection=e;b.refresh(a)}else{b=new q(c,e,a);a._rangySelection=b}return b};b.getIframeSelection=function(a){return b.getSelection(m.getIframeWindow(a))};u=q.prototype;if(!D&&E&&s.areHostMethods(t,["removeAllRanges","addRange"])){u.removeAllRanges=function(){this.nativeSelection.removeAllRanges();f(this)};var L=function(a,
91
+c){var d=x.getRangeDocument(c),d=b.createRange(d);d.collapseToPoint(c.endContainer,c.endOffset);a.nativeSelection.addRange(h(d));a.nativeSelection.extend(c.startContainer,c.startOffset);a.refresh()};u.addRange=N?function(a,c){if(l&&v&&this.docSelection.type=="Control")j(this,a);else if(c&&I)L(this,a);else{var d;if(J)d=this.rangeCount;else{this.removeAllRanges();d=0}this.nativeSelection.addRange(h(a));this.rangeCount=this.nativeSelection.rangeCount;if(this.rangeCount==d+1){if(b.config.checkSelectionRanges)(d=
92
+B(this.nativeSelection,this.rangeCount-1))&&!x.rangesEqual(d,a)&&(a=new o(d));this._ranges[this.rangeCount-1]=a;e(this,a,H(this.nativeSelection));this.isCollapsed=A(this)}else this.refresh()}}:function(a,b){if(b&&I)L(this,a);else{this.nativeSelection.addRange(h(a));this.refresh()}};u.setRanges=function(a){if(l&&a.length>1)n(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;b<c;++b)this.addRange(a[b])}}}else if(s.isHostMethod(t,"empty")&&s.isHostMethod(K,"select")&&l&&D)u.removeAllRanges=
93
+function(){try{this.docSelection.empty();if(this.docSelection.type!="None"){var a;if(this.anchorNode)a=m.getDocument(this.anchorNode);else if(this.docSelection.type=="Control"){var b=this.docSelection.createRange();b.length&&(a=m.getDocument(b.item(0)).body.createTextRange())}if(a){a.body.createTextRange().select();this.docSelection.empty()}}}catch(c){}f(this)},u.addRange=function(a){if(this.docSelection.type=="Control")j(this,a);else{o.rangeToTextRange(a).select();this._ranges[0]=a;this.rangeCount=
94
+1;this.isCollapsed=this._ranges[0].collapsed;e(this,a,false)}},u.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?n(this,a):b&&this.addRange(a[0])};else return c.fail("No means of selecting a Range or TextRange was found"),!1;u.getRangeAt=function(a){if(a<0||a>=this.rangeCount)throw new z("INDEX_SIZE_ERR");return this._ranges[a]};var G;if(D)G=function(a){var c;if(b.isSelectionValid(a.win))c=a.docSelection.createRange();else{c=m.getBody(a.win.document).createTextRange();c.collapse(true)}a.docSelection.type==
95
+"Control"?k(a):c&&typeof c.text!="undefined"?g(a,c):f(a)};else if(s.isHostMethod(t,"getRangeAt")&&"number"==typeof t.rangeCount)G=function(a){if(l&&v&&a.docSelection.type=="Control")k(a);else{a._ranges.length=a.rangeCount=a.nativeSelection.rangeCount;if(a.rangeCount){for(var c=0,d=a.rangeCount;c<d;++c)a._ranges[c]=new b.WrappedRange(a.nativeSelection.getRangeAt(c));e(a,a._ranges[a.rangeCount-1],H(a.nativeSelection));a.isCollapsed=A(a)}else f(a)}};else if(E&&"boolean"==typeof t.isCollapsed&&"boolean"==
96
+typeof K.collapsed&&b.features.implementsDomRange)G=function(a){var b;b=a.nativeSelection;if(b.anchorNode){b=B(b,0);a._ranges=[b];a.rangeCount=1;b=a.nativeSelection;a.anchorNode=b.anchorNode;a.anchorOffset=b.anchorOffset;a.focusNode=b.focusNode;a.focusOffset=b.focusOffset;a.isCollapsed=A(a)}else f(a)};else return c.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;u.refresh=function(a){var b=a?this._ranges.slice(0):null;G(this);if(a){a=b.length;if(a!=this._ranges.length)return false;
97
+for(;a--;)if(!x.rangesEqual(b[a],this._ranges[a]))return false;return true}};var P=function(a,b){var c=a.getAllRanges(),d=false;a.removeAllRanges();for(var e=0,g=c.length;e<g;++e)d||b!==c[e]?a.addRange(c[e]):d=true;a.rangeCount||f(a)};u.removeRange=l?function(a){if(this.docSelection.type=="Control"){for(var b=this.docSelection.createRange(),a=i(a),c=m.getDocument(b.item(0)),c=m.getBody(c).createControlRange(),d,e=false,g=0,j=b.length;g<j;++g){d=b.item(g);d!==a||e?c.add(b.item(g)):e=true}c.select();
98
+k(this)}else P(this,a)}:function(a){P(this,a)};var H;!D&&E&&b.features.implementsDomRange?(H=function(a){var b=false;a.anchorNode&&(b=m.comparePoints(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)==1);return b},u.isBackwards=function(){return H(this)}):H=u.isBackwards=function(){return false};u.toString=function(){for(var a=[],b=0,c=this.rangeCount;b<c;++b)a[b]=""+this._ranges[b];return a.join("")};u.collapse=function(a,c){p(this,a);var d=b.createRange(m.getDocument(a));d.collapseToPoint(a,
99
+c);this.removeAllRanges();this.addRange(d);this.isCollapsed=true};u.collapseToStart=function(){if(this.rangeCount){var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)}else throw new z("INVALID_STATE_ERR");};u.collapseToEnd=function(){if(this.rangeCount){var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)}else throw new z("INVALID_STATE_ERR");};u.selectAllChildren=function(a){p(this,a);var c=b.createRange(m.getDocument(a));c.selectNodeContents(a);this.removeAllRanges();
100
+this.addRange(c)};u.deleteFromDocument=function(){if(l&&v&&this.docSelection.type=="Control"){for(var a=this.docSelection.createRange(),b;a.length;){b=a.item(0);a.remove(b);b.parentNode.removeChild(b)}this.refresh()}else if(this.rangeCount){a=this.getAllRanges();this.removeAllRanges();b=0;for(var c=a.length;b<c;++b)a[b].deleteContents();this.addRange(a[c-1])}};u.getAllRanges=function(){return this._ranges.slice(0)};u.setSingleRange=function(a){this.setRanges([a])};u.containsNode=function(a,b){for(var c=
101
+0,d=this._ranges.length;c<d;++c)if(this._ranges[c].containsNode(a,b))return true;return false};u.toHtml=function(){var a="";if(this.rangeCount){for(var a=x.getRangeDocument(this._ranges[0]).createElement("div"),b=0,c=this._ranges.length;b<c;++b)a.appendChild(this._ranges[b].cloneContents());a=a.innerHTML}return a};u.getName=function(){return"WrappedSelection"};u.inspect=function(){return r(this)};u.detach=function(){this.win=this.anchorNode=this.focusNode=this.win._rangySelection=null};q.inspect=
102
+r;b.Selection=q;b.selectionPrototype=u;b.addCreateMissingNativeApiListener(function(a){if(typeof a.getSelection=="undefined")a.getSelection=function(){return b.getSelection(this)};a=null})});var Base=function(){};
103
+Base.extend=function(b,c){var a=Base.prototype.extend;Base._prototyping=!0;var d=new this;a.call(d,b);d.base=function(){};delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||a).call(arguments[0],d)};f.ancestor=this;f.extend=this.extend;f.forEach=this.forEach;f.implement=this.implement;f.prototype=
104
+d;f.toString=this.toString;f.valueOf=function(a){return"object"==a?f:e.valueOf()};a.call(f,c);"function"==typeof f.init&&f.init();return f};
105
+Base.prototype={extend:function(b,c){if(1<arguments.length){var a=this[b];if(a&&"function"==typeof c&&(!a.valueOf||a.valueOf()!=c.valueOf())&&/\bbase\b/.test(c)){var d=c.valueOf(),c=function(){var b=this.base||Base.prototype.base;this.base=a;var c=d.apply(this,arguments);this.base=b;return c};c.valueOf=function(a){return"object"==a?c:d};c.toString=Base.toString}this[b]=c}else if(b){var e=Base.prototype.extend;!Base._prototyping&&"function"!=typeof this&&(e=this.extend||e);for(var f={toSource:null},
106
+h=["constructor","toString","valueOf"],i=Base._prototyping?0:1;g=h[i++];)b[g]!=f[g]&&e.call(this,g,b[g]);for(var g in b)f[g]||e.call(this,g,b[g])}return this}};
107
+Base=Base.extend({constructor:function(b){this.extend(b)}},{ancestor:Object,version:"1.1",forEach:function(b,c,a){for(var d in b)void 0===this.prototype[d]&&c.call(a,b[d],d,b)},implement:function(){for(var b=0;b<arguments.length;b++)if("function"==typeof arguments[b])arguments[b](this.prototype);else this.prototype.extend(arguments[b]);return this},toString:function(){return""+this.valueOf()}});
108
+wysihtml5.browser=function(){var b=navigator.userAgent,c=document.createElement("div"),a=-1!==b.indexOf("MSIE")&&-1===b.indexOf("Opera"),d=-1!==b.indexOf("Gecko")&&-1===b.indexOf("KHTML"),e=-1!==b.indexOf("AppleWebKit/"),f=-1!==b.indexOf("Chrome/"),h=-1!==b.indexOf("Opera/");return{USER_AGENT:b,supported:function(){var a=this.USER_AGENT.toLowerCase(),b="contentEditable"in c,d=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,e=document.querySelector&&document.querySelectorAll,
109
+a=this.isIos()&&5>(/ipad|iphone|ipod/.test(a)&&a.match(/ os (\d+).+? like mac os x/)||[,0])[1]||-1!==a.indexOf("opera mobi")||-1!==a.indexOf("hpwos/");return b&&d&&e&&!a},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){var a=this.USER_AGENT.toLowerCase();return-1!==a.indexOf("webkit")&&-1!==a.indexOf("mobile")},supportsSandboxedIframes:function(){return a},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return!d},
110
+hasCurrentStyleProperty:function(){return"currentStyle"in c},insertsLineBreaksOnReturn:function(){return d},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){var b;if(!(b="on"+a in c))c.setAttribute("on"+a,"return;"),b="function"===typeof c["on"+a];return b},supportsEventsInIframeCorrectly:function(){return!h},firesOnDropOnlyWhenOnDragOverIsCancelled:function(){return e||d},supportsDataTransfer:function(){try{return e&&(window.Clipboard||window.DataTransfer).prototype.getData}catch(a){return!1}},
111
+supportsHTML5Tags:function(a){a=a.createElement("div");a.innerHTML="<article>foo</article>";return"<article>foo</article>"===a.innerHTML.toLowerCase()},supportsCommand:function(){var b={formatBlock:a,insertUnorderedList:a||h,insertOrderedList:a||h},c={insertHTML:d};return function(a,d){if(!b[d]){try{return a.queryCommandSupported(d)}catch(e){}try{return a.queryCommandEnabled(d)}catch(f){return!!c[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return a},canDisableAutoLinking:function(){return this.supportsCommand(document,
112
+"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return d||h||e},supportsGetAttributeCorrectly:function(){return"1"!=document.createElement("td").getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return d||a||h},clearsListsInContentEditableCorrectly:function(){return d||a||e},autoScrollsToCaret:function(){return!e},autoClosesUnclosedTags:function(){var a=c.cloneNode(!1),b;a.innerHTML="<p><div></div>";a=a.innerHTML.toLowerCase();b="<p></p><div></div>"===a||"<p><div></div></p>"===
113
+a;this.autoClosesUnclosedTags=function(){return b};return b},supportsNativeGetElementsByClassName:function(){return-1!==(""+document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},supportsClassList:function(){return"classList"in c},needsSpaceAfterLineBreak:function(){return h},supportsSpeechApiOn:function(a){return 11<=(b.match(/Chrome\/(\d+)/)||[,0])[1]&&("onwebkitspeechchange"in a||"speech"in a)},
114
+crashesWhenDefineProperty:function(b){return a&&("XMLHttpRequest"===b||"XDomainRequest"===b)},doesAsyncFocus:function(){return a},hasProblemsSettingCaretAfterImg:function(){return a},hasUndoInContextMenu:function(){return d||f||h}}}();
115
+wysihtml5.lang.array=function(b){return{contains:function(c){if(b.indexOf)return-1!==b.indexOf(c);for(var a=0,d=b.length;a<d;a++)if(b[a]===c)return!0;return!1},without:function(c){for(var c=wysihtml5.lang.array(c),a=[],d=0,e=b.length;d<e;d++)c.contains(b[d])||a.push(b[d]);return a},get:function(){for(var c=0,a=b.length,d=[];c<a;c++)d.push(b[c]);return d}}};
116
+wysihtml5.lang.Dispatcher=Base.extend({observe:function(b,c){this.events=this.events||{};this.events[b]=this.events[b]||[];this.events[b].push(c);return this},on:function(){return this.observe.apply(this,wysihtml5.lang.array(arguments).get())},fire:function(b,c){this.events=this.events||{};for(var a=this.events[b]||[],d=0;d<a.length;d++)a[d].call(this,c);return this},stopObserving:function(b,c){this.events=this.events||{};var a=0,d,e;if(b){d=this.events[b]||[];for(e=[];a<d.length;a++)d[a]!==c&&c&&
117
+e.push(d[a]);this.events[b]=e}else this.events={};return this}});wysihtml5.lang.object=function(b){return{merge:function(c){for(var a in c)b[a]=c[a];return this},get:function(){return b},clone:function(){var c={},a;for(a in b)c[a]=b[a];return c},isArray:function(){return"[object Array]"===Object.prototype.toString.call(b)}}};
118
+(function(){var b=/^\s+/,c=/\s+$/;wysihtml5.lang.string=function(a){a=""+a;return{trim:function(){return a.replace(b,"").replace(c,"")},interpolate:function(b){for(var c in b)a=this.replace("#{"+c+"}").by(b[c]);return a},replace:function(b){return{by:function(c){return a.split(b).join(c)}}}}}})();
119
+(function(b){function c(a){return a.replace(e,function(a,b){var c=(b.match(f)||[])[1]||"",d=i[c],b=b.replace(f,"");b.split(d).length>b.split(c).length&&(b+=c,c="");var e=d=b;b.length>h&&(e=e.substr(0,h)+"...");"www."===d.substr(0,4)&&(d="http://"+d);return'<a href="'+d+'">'+e+"</a>"+c})}function a(g){if(!d.contains(g.nodeName))if(g.nodeType===b.TEXT_NODE&&g.data.match(e)){var f=g.parentNode,j;j=f.ownerDocument;var h=j._wysihtml5_tempElement;h||(h=j._wysihtml5_tempElement=j.createElement("div"));j=
120
+h;j.innerHTML="<span></span>"+c(g.data);for(j.removeChild(j.firstChild);j.firstChild;)f.insertBefore(j.firstChild,g);f.removeChild(g)}else{f=b.lang.array(g.childNodes).get();j=f.length;for(h=0;h<j;h++)a(f[h]);return g}}var d=b.lang.array("CODE,PRE,A,SCRIPT,HEAD,TITLE,STYLE".split(",")),e=/((https?:\/\/|www\.)[^\s<]{3,})/gi,f=/([^\w\/\-](,?))$/i,h=100,i={")":"(","]":"[","}":"{"};b.dom.autoLink=function(b){var c;a:{c=b;for(var e;c.parentNode;){c=c.parentNode;e=c.nodeName;if(d.contains(e)){c=!0;break a}if("body"===
121
+e)break}c=!1}if(c)return b;b===b.ownerDocument.documentElement&&(b=b.ownerDocument.body);return a(b)};b.dom.autoLink.URL_REG_EXP=e})(wysihtml5);
122
+(function(b){var c=b.browser.supportsClassList(),a=b.dom;a.addClass=function(b,e){if(c)return b.classList.add(e);a.hasClass(b,e)||(b.className+=" "+e)};a.removeClass=function(a,b){if(c)return a.classList.remove(b);a.className=a.className.replace(RegExp("(^|\\s+)"+b+"(\\s+|$)")," ")};a.hasClass=function(a,b){if(c)return a.classList.contains(b);var f=a.className;return 0<f.length&&(f==b||RegExp("(^|\\s)"+b+"(\\s|$)").test(f))}})(wysihtml5);
123
+wysihtml5.dom.contains=function(){var b=document.documentElement;if(b.contains)return function(b,a){a.nodeType!==wysihtml5.ELEMENT_NODE&&(a=a.parentNode);return b!==a&&b.contains(a)};if(b.compareDocumentPosition)return function(b,a){return!!(b.compareDocumentPosition(a)&16)}}();
124
+wysihtml5.dom.convertToList=function(){function b(b,a){var d=b.createElement("li");a.appendChild(d);return d}return function(c,a){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;for(var d=c.ownerDocument,e=d.createElement(a),f=wysihtml5.lang.array(c.childNodes).get(),h=f.length,i,g,k,j,q=0;q<h;q++)j=j||b(d,e),i=f[q],g="block"===wysihtml5.dom.getStyle("display").from(i),k="BR"===i.nodeName,g?(j=j.firstChild?b(d,e):j,j.appendChild(i),j=null):k?j=j.firstChild?null:j:j.appendChild(i);
125
+c.parentNode.replaceChild(e,c);return e}}();wysihtml5.dom.copyAttributes=function(b){return{from:function(c){return{to:function(a){for(var d,e=0,f=b.length;e<f;e++)d=b[e],c[d]&&(a[d]=c[d]);return{andTo:arguments.callee}}}}}};
126
+(function(b){var c=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],a=function(a){var e;a:for(var f=0,h=c.length;f<h;f++)if("border-box"===b.getStyle(c[f]).from(a)){e=c[f];break a}return e?parseInt(b.getStyle("width").from(a),10)<a.offsetWidth:!1};b.copyStyles=function(d){return{from:function(e){a(e)&&(d=wysihtml5.lang.array(d).without(c));for(var f="",h=d.length,i=0,g;i<h;i++)g=d[i],f+=g+":"+b.getStyle(g).from(e)+";";return{to:function(a){b.setStyles(f).on(a);return{andTo:arguments.callee}}}}}}})(wysihtml5.dom);
127
+(function(b){b.dom.delegate=function(c,a,d,e){return b.dom.observe(c,d,function(d){for(var h=d.target,i=b.lang.array(c.querySelectorAll(a));h&&h!==c;){if(i.contains(h)){e.call(h,d);break}h=h.parentNode}})}})(wysihtml5);
128
+wysihtml5.dom.getAsDom=function(){var b="abbr,article,aside,audio,bdi,canvas,command,datalist,details,figcaption,figure,footer,header,hgroup,keygen,mark,meter,nav,output,progress,rp,rt,ruby,svg,section,source,summary,time,track,video,wbr".split(",");return function(c,a){var a=a||document,d;if("object"===typeof c&&c.nodeType)d=a.createElement("div"),d.appendChild(c);else if(wysihtml5.browser.supportsHTML5Tags(a))d=a.createElement("div"),d.innerHTML=c;else{d=a;if(!d._wysihtml5_supportsHTML5Tags){for(var e=
129
+0,f=b.length;e<f;e++)d.createElement(b[e]);d._wysihtml5_supportsHTML5Tags=!0}d=a;e=d.createElement("div");e.style.display="none";d.body.appendChild(e);try{e.innerHTML=c}catch(h){}d.body.removeChild(e);d=e}return d}}();
130
+wysihtml5.dom.getParentElement=function(){function b(b,a){return!a||!a.length?!0:"string"===typeof a?b===a:wysihtml5.lang.array(a).contains(b)}return function(c,a,d){d=d||50;if(a.className||a.classRegExp){a:{for(var e=a.nodeName,f=a.className,a=a.classRegExp;d--&&c&&"BODY"!==c.nodeName;){var h;if(h=c.nodeType===wysihtml5.ELEMENT_NODE)if(h=b(c.nodeName,e)){h=f;var i=(c.className||"").match(a)||[];h=!h?!!i.length:i[i.length-1]===h}if(h)break a;c=c.parentNode}c=null}return c}a:{e=a.nodeName;for(f=d;f--&&
131
+c&&"BODY"!==c.nodeName;){if(b(c.nodeName,e))break a;c=c.parentNode}c=null}return c}}();
132
+wysihtml5.dom.getStyle=function(){function b(b){return b.replace(a,function(a){return a.charAt(1).toUpperCase()})}var c={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},a=/\-[a-z]/g;return function(a){return{from:function(e){if(e.nodeType===wysihtml5.ELEMENT_NODE){var f=e.ownerDocument,h=c[a]||b(a),i=e.style,g=e.currentStyle,k=i[h];if(k)return k;if(g)try{return g[h]}catch(j){}var h=f.defaultView||f.parentWindow,f=("height"===a||"width"===a)&&"TEXTAREA"===e.nodeName,
133
+q;if(h.getComputedStyle)return f&&(q=i.overflow,i.overflow="hidden"),e=h.getComputedStyle(e,null).getPropertyValue(a),f&&(i.overflow=q||""),e}}}}}();wysihtml5.dom.hasElementWithTagName=function(){var b={},c=1;return function(a,d){var e=(a._wysihtml5_identifier||(a._wysihtml5_identifier=c++))+":"+d,f=b[e];f||(f=b[e]=a.getElementsByTagName(d));return 0<f.length}}();
134
+(function(b){var c={},a=1;b.dom.hasElementWithClassName=function(d,e){if(!b.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=(d._wysihtml5_identifier||(d._wysihtml5_identifier=a++))+":"+e,h=c[f];h||(h=c[f]=d.getElementsByClassName(e));return 0<h.length}})(wysihtml5);wysihtml5.dom.insert=function(b){return{after:function(c){c.parentNode.insertBefore(b,c.nextSibling)},before:function(c){c.parentNode.insertBefore(b,c)},into:function(c){c.appendChild(b)}}};
135
+wysihtml5.dom.insertCSS=function(b){b=b.join("\n");return{into:function(c){var a=c.head||c.getElementsByTagName("head")[0],d=c.createElement("style");d.type="text/css";d.styleSheet?d.styleSheet.cssText=b:d.appendChild(c.createTextNode(b));a&&a.appendChild(d)}}};
136
+wysihtml5.dom.observe=function(b,c,a){for(var c="string"===typeof c?[c]:c,d,e,f=0,h=c.length;f<h;f++)e=c[f],b.addEventListener?b.addEventListener(e,a,!1):(d=function(c){"target"in c||(c.target=c.srcElement);c.preventDefault=c.preventDefault||function(){this.returnValue=false};c.stopPropagation=c.stopPropagation||function(){this.cancelBubble=true};a.call(b,c)},b.attachEvent("on"+e,d));return{stop:function(){for(var e,g=0,f=c.length;g<f;g++)e=c[g],b.removeEventListener?b.removeEventListener(e,a,!1):
137
+b.detachEvent("on"+e,d)}}};
138
+wysihtml5.dom.parse=function(){function b(c,e){var g=c.childNodes,f=g.length,k;k=a[c.nodeType];var h=0;k=k&&k(c);if(!k)return null;for(h=0;h<f;h++)(newChild=b(g[h],e))&&k.appendChild(newChild);return e&&1>=k.childNodes.length&&k.nodeName.toLowerCase()===d&&!k.attributes.length?k.firstChild:k}function c(a,b){var b=b.toLowerCase(),c;if(c="IMG"==a.nodeName)if(c="src"==b){var d;try{d=a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(e){a.complete&&"complete"===a.readyState&&(d=!0)}c=!0===d}return c?
139
+a.src:i&&"outerHTML"in a?-1!=a.outerHTML.toLowerCase().indexOf(" "+b+"=")?a.getAttribute(b):null:a.getAttribute(b)}var a={1:function(a){var b,f,i=h.tags;f=a.nodeName.toLowerCase();b=a.scopeName;if(a._wysihtml5)return null;a._wysihtml5=1;if("wysihtml5-temp"===a.className)return null;b&&"HTML"!=b&&(f=b+":"+f);"outerHTML"in a&&!wysihtml5.browser.autoClosesUnclosedTags()&&"P"===a.nodeName&&"</p>"!==a.outerHTML.slice(-4).toLowerCase()&&(f="div");if(f in i){b=i[f];if(!b||b.remove)return null;b="string"===
140
+typeof b?{rename_tag:b}:b}else if(a.firstChild)b={rename_tag:d};else return null;f=a.ownerDocument.createElement(b.rename_tag||f);var i={},r=b.set_class,m=b.add_class,s=b.set_attributes,x=b.check_attributes,o=h.classes,z=0,w=[];b=[];var y=[],A=[],t;s&&(i=wysihtml5.lang.object(s).clone());if(x)for(t in x)if(s=g[x[t]])s=s(c(a,t)),"string"===typeof s&&(i[t]=s);r&&w.push(r);if(m)for(t in m)if(s=k[m[t]])r=s(c(a,t)),"string"===typeof r&&w.push(r);o["_wysihtml5-temp-placeholder"]=1;(A=a.getAttribute("class"))&&
141
+(w=w.concat(A.split(e)));for(m=w.length;z<m;z++)a=w[z],o[a]&&b.push(a);for(o=b.length;o--;)a=b[o],wysihtml5.lang.array(y).contains(a)||y.unshift(a);y.length&&(i["class"]=y.join(" "));for(t in i)try{f.setAttribute(t,i[t])}catch(v){}i.src&&("undefined"!==typeof i.width&&f.setAttribute("width",i.width),"undefined"!==typeof i.height&&f.setAttribute("height",i.height));return f},3:function(a){return a.ownerDocument.createTextNode(a.data)}},d="span",e=/\s+/,f={tags:{},classes:{}},h={},i=!wysihtml5.browser.supportsGetAttributeCorrectly(),
142
+g={url:function(){var a=/^https?:\/\//i;return function(b){return!b||!b.match(a)?null:b.replace(a,function(a){return a.toLowerCase()})}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b){return!b?"":b.replace(a,"")}}(),numbers:function(){var a=/\D/g;return function(b){return(b=(b||"").replace(a,""))||null}}()},k={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[(""+b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",
143
+right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[(""+b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[(""+b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",
144
+6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[(""+b).charAt(0)]}}()};return function(a,c,d,e){wysihtml5.lang.object(h).merge(f).merge(c).get();for(var d=d||a.ownerDocument||document,c=d.createDocumentFragment(),g="string"===typeof a,a=g?wysihtml5.dom.getAsDom(a,d):a;a.firstChild;)d=a.firstChild,a.removeChild(d),(d=b(d,e))&&c.appendChild(d);a.innerHTML="";a.appendChild(c);return g?wysihtml5.quirks.getCorrectInnerHTML(a):
145
+a}}();wysihtml5.dom.removeEmptyTextNodes=function(b){for(var c=wysihtml5.lang.array(b.childNodes).get(),a=c.length,d=0;d<a;d++)b=c[d],b.nodeType===wysihtml5.TEXT_NODE&&""===b.data&&b.parentNode.removeChild(b)};wysihtml5.dom.renameElement=function(b,c){for(var a=b.ownerDocument.createElement(c),d;d=b.firstChild;)a.appendChild(d);wysihtml5.dom.copyAttributes(["align","className"]).from(b).to(a);b.parentNode.replaceChild(a,b);return a};
146
+wysihtml5.dom.replaceWithChildNodes=function(b){if(b.parentNode)if(b.firstChild){for(var c=b.ownerDocument.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);b.parentNode.replaceChild(c,b)}else b.parentNode.removeChild(b)};
147
+(function(b){function c(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}b.resolveList=function(a){if(!("MENU"!==a.nodeName&&"UL"!==a.nodeName&&"OL"!==a.nodeName)){var d=a.ownerDocument.createDocumentFragment(),e=a.previousSibling,f,h,i;for(e&&"block"!==b.getStyle("display").from(e)&&c(d);i=a.firstChild;){for(f=i.lastChild;e=i.firstChild;)h=(h=e===f)&&"block"!==b.getStyle("display").from(e)&&"BR"!==e.nodeName,d.appendChild(e),h&&c(d);i.parentNode.removeChild(i)}a.parentNode.replaceChild(d,
148
+a)}}})(wysihtml5.dom);
149
+(function(b){var c=document,a="parent,top,opener,frameElement,frames,localStorage,globalStorage,sessionStorage,indexedDB".split(","),d="open,close,openDialog,showModalDialog,alert,confirm,prompt,openDatabase,postMessage,XMLHttpRequest,XDomainRequest".split(","),e=["referrer","write","open","close"];b.dom.Sandbox=Base.extend({constructor:function(a,c){this.callback=a||b.EMPTY_FUNCTION;this.config=b.lang.object({}).merge(c).get();this.iframe=this._createIframe()},insertInto:function(a){"string"===typeof a&&
150
+(a=c.getElementById(a));a.appendChild(this.iframe)},getIframe:function(){return this.iframe},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet");},_createIframe:function(){var a=this,d=c.createElement("iframe");d.className="wysihtml5-sandbox";b.dom.setAttributes({security:"restricted",allowtransparency:"true",
151
+frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d);b.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:'<html></html>'");d.onload=function(){d.onreadystatechange=d.onload=null;a._onLoadIframe(d)};d.onreadystatechange=function(){if(/loaded|complete/.test(d.readyState)){d.onreadystatechange=d.onload=null;a._onLoadIframe(d)}};return d},_onLoadIframe:function(f){if(b.dom.contains(c.documentElement,f)){var h=this,i=f.contentWindow,g=f.contentWindow.document,k=
152
+this._getHtml({charset:c.characterSet||c.charset||"utf-8",stylesheets:this.config.stylesheets});g.open("text/html","replace");g.write(k);g.close();this.getWindow=function(){return f.contentWindow};this.getDocument=function(){return f.contentWindow.document};i.onerror=function(a,b,c){throw Error("wysihtml5.Sandbox: "+a,b,c);};if(!b.browser.supportsSandboxedIframes()){var j,k=0;for(j=a.length;k<j;k++)this._unset(i,a[k]);k=0;for(j=d.length;k<j;k++)this._unset(i,d[k],b.EMPTY_FUNCTION);k=0;for(j=e.length;k<
153
+j;k++)this._unset(g,e[k]);this._unset(g,"cookie","",!0)}this.loaded=!0;setTimeout(function(){h.callback(h)},0)}},_getHtml:function(a){var c=a.stylesheets,d="",e=0,k;if(c="string"===typeof c?[c]:c)for(k=c.length;e<k;e++)d+='<link rel="stylesheet" href="'+c[e]+'">';a.stylesheets=d;return b.lang.string('<!DOCTYPE html><html><head><meta charset="#{charset}">#{stylesheets}</head><body></body></html>').interpolate(a)},_unset:function(a,c,d,e){try{a[c]=d}catch(k){}try{a.__defineGetter__(c,function(){return d})}catch(j){}if(e)try{a.__defineSetter__(c,
154
+function(){})}catch(q){}if(!b.browser.crashesWhenDefineProperty(c))try{var n={get:function(){return d}};e&&(n.set=function(){});Object.defineProperty(a,c,n)}catch(p){}}})})(wysihtml5);(function(){var b={className:"class"};wysihtml5.dom.setAttributes=function(c){return{on:function(a){for(var d in c)a.setAttribute(b[d]||d,c[d])}}}})();
155
+wysihtml5.dom.setStyles=function(b){return{on:function(c){c=c.style;if("string"===typeof b)c.cssText+=";"+b;else for(var a in b)"float"===a?(c.cssFloat=b[a],c.styleFloat=b[a]):c[a]=b[a]}}};
156
+(function(b){b.simulatePlaceholder=function(c,a,d){var e=function(){a.hasPlaceholderSet()&&a.clear();b.removeClass(a.element,"placeholder")},f=function(){a.isEmpty()&&(a.setValue(d),b.addClass(a.element,"placeholder"))};c.observe("set_placeholder",f).observe("unset_placeholder",e).observe("focus:composer",e).observe("paste:composer",e).observe("blur:composer",f);f()}})(wysihtml5.dom);
157
+(function(b){var c=document.documentElement;"textContent"in c?(b.setTextContent=function(a,b){a.textContent=b},b.getTextContent=function(a){return a.textContent}):"innerText"in c?(b.setTextContent=function(a,b){a.innerText=b},b.getTextContent=function(a){return a.innerText}):(b.setTextContent=function(a,b){a.nodeValue=b},b.getTextContent=function(a){return a.nodeValue})})(wysihtml5.dom);
158
+wysihtml5.quirks.cleanPastedHTML=function(){var b={"a u":wysihtml5.dom.replaceWithChildNodes};return function(c,a,d){var a=a||b,d=d||c.ownerDocument||document,e="string"===typeof c,f,h,i,g=0,c=e?wysihtml5.dom.getAsDom(c,d):c;for(i in a){f=c.querySelectorAll(i);d=a[i];for(h=f.length;g<h;g++)d(f[g])}return e?c.innerHTML:c}}();
159
+(function(b){var c=b.dom;b.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();if("<p>&nbsp;</p>"==b||"<p>&nbsp;</p><p>&nbsp;</p>"==b)a.innerHTML=""},0)};return function(b){c.observe(b.element,["cut","keydown"],a)}}();b.quirks.ensureProperClearingOfLists=function(){var a=["OL","UL","MENU"];return function(d){c.observe(d.element,"keydown",function(e){if(e.keyCode===b.BACKSPACE_KEY){var f=d.selection.getSelectedNode(),e=d.element;
160
+e.firstChild&&b.lang.array(a).contains(e.firstChild.nodeName)&&(f=c.getParentElement(f,{nodeName:a}))&&f==e.firstChild&&1>=f.childNodes.length&&(f.firstChild?""===f.firstChild.innerHTML:1)&&f.parentNode.removeChild(f)}})}}()})(wysihtml5);
161
+(function(b){b.quirks.getCorrectInnerHTML=function(c){var a=c.innerHTML;if(-1===a.indexOf("%7E"))return a;var c=c.querySelectorAll("[href*='~'], [src*='~']"),d,e,f,h;h=0;for(f=c.length;h<f;h++)d=c[h].href||c[h].src,e=b.lang.string(d).replace("~").by("%7E"),a=b.lang.string(a).replace(e).by(d);return a}})(wysihtml5);
162
+(function(b){var c=b.dom,a="LI,P,H1,H2,H3,H4,H5,H6".split(","),d=["UL","OL","MENU"];b.quirks.insertLineBreakOnReturn=function(e){function f(a){if(a=c.getParentElement(a,{nodeName:["P","DIV"]},2)){var d=document.createTextNode(b.INVISIBLE_SPACE);c.insert(d).before(a);c.replaceWithChildNodes(a);e.selection.selectNode(d)}}c.observe(e.element.ownerDocument,"keydown",function(h){var i=h.keyCode;if(!(h.shiftKey||i!==b.ENTER_KEY&&i!==b.BACKSPACE_KEY)){var g=e.selection.getSelectedNode();(g=c.getParentElement(g,
163
+{nodeName:a},4))?"LI"===g.nodeName&&(i===b.ENTER_KEY||i===b.BACKSPACE_KEY)?setTimeout(function(){var a=e.selection.getSelectedNode(),b;a&&((b=c.getParentElement(a,{nodeName:d},2))||f(a))},0):g.nodeName.match(/H[1-6]/)&&i===b.ENTER_KEY&&setTimeout(function(){f(e.selection.getSelectedNode())},0):i===b.ENTER_KEY&&!b.browser.insertsLineBreaksOnReturn()&&(e.commands.exec("insertLineBreak"),h.preventDefault())}})}})(wysihtml5);
164
+(function(b){b.quirks.redraw=function(c){b.dom.addClass(c,"wysihtml5-quirks-redraw");b.dom.removeClass(c,"wysihtml5-quirks-redraw");try{var a=c.ownerDocument;a.execCommand("italic",!1,null);a.execCommand("italic",!1,null)}catch(d){}}})(wysihtml5);
165
+(function(b){var c=b.dom;b.Selection=Base.extend({constructor:function(a){window.rangy.init();this.editor=a;this.composer=a.composer;this.doc=this.composer.doc},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);b.setStartBefore(a);b.setEndBefore(a);return this.setSelection(b)},setAfter:function(a){var b=rangy.createRange(this.doc);b.setStartAfter(a);b.setEndAfter(a);return this.setSelection(b)},
166
+selectNode:function(a){var d=rangy.createRange(this.doc),e=a.nodeType===b.ELEMENT_NODE,f="canHaveHTML"in a?a.canHaveHTML:"IMG"!==a.nodeName,h=e?a.innerHTML:a.data,h=""===h||h===b.INVISIBLE_SPACE,i=c.getStyle("display").from(a),i="block"===i||"list-item"===i;if(h&&e&&f)try{a.innerHTML=b.INVISIBLE_SPACE}catch(g){}f?d.selectNodeContents(a):d.selectNode(a);f&&h&&e?d.collapse(i):f&&h&&(d.setStartAfter(a),d.setEndAfter(a));this.setSelection(d)},getSelectedNode:function(a){if(a&&this.doc.selection&&"Control"===
167
+this.doc.selection.type&&(a=this.doc.selection.createRange())&&a.length)return a.item(0);a=this.getSelection(this.doc);return a.focusNode===a.anchorNode?a.focusNode:(a=this.getRange(this.doc))?a.commonAncestorContainer:this.doc.body},executeAndRestore:function(a,c){var e=this.doc.body,f=c&&e.scrollTop,h=c&&e.scrollLeft,i='<span class="_wysihtml5-temp-placeholder">'+b.INVISIBLE_SPACE+"</span>",g=this.getRange(this.doc);if(g){i=g.createContextualFragment(i);g.insertNode(i);try{a(g.startContainer,g.endContainer)}catch(k){setTimeout(function(){throw k;
168
+},0)}(caretPlaceholder=this.doc.querySelector("._wysihtml5-temp-placeholder"))?(g=rangy.createRange(this.doc),g.selectNode(caretPlaceholder),g.deleteContents(),this.setSelection(g)):e.focus();c&&(e.scrollTop=f,e.scrollLeft=h);try{caretPlaceholder.parentNode.removeChild(caretPlaceholder)}catch(j){}}else a(e,e)},executeAndRestoreSimple:function(a){var b,c,f=this.getRange(),h=this.doc.body,i;if(f){b=f.getNodes([3]);h=b[0]||f.startContainer;i=b[b.length-1]||f.endContainer;b=h===f.startContainer?f.startOffset:
169
+0;c=i===f.endContainer?f.endOffset:i.length;try{a(f.startContainer,f.endContainer)}catch(g){setTimeout(function(){throw g;},0)}a=rangy.createRange(this.doc);try{a.setStart(h,b)}catch(k){}try{a.setEnd(i,c)}catch(j){}try{this.setSelection(a)}catch(q){}}else a(h,h)},insertHTML:function(a){var a=rangy.createRange(this.doc).createContextualFragment(a),b=a.lastChild;this.insertNode(a);b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},surround:function(a){var b=this.getRange();
170
+if(b)try{b.surroundContents(a),this.selectNode(a)}catch(c){a.appendChild(b.extractContents()),b.insertNode(a)}},scrollIntoView:function(){var a=this.doc,c=a.documentElement.scrollHeight>a.documentElement.offsetHeight,e;if(!(e=a._wysihtml5ScrollIntoViewElement))e=a.createElement("span"),e.innerHTML=b.INVISIBLE_SPACE;e=a._wysihtml5ScrollIntoViewElement=e;if(c){this.insertNode(e);var c=e,f=0;if(c.parentNode){do f+=c.offsetTop||0,c=c.offsetParent;while(c)}c=f;e.parentNode.removeChild(e);c>a.body.scrollTop&&
171
+(a.body.scrollTop=c)}},selectLine:function(){b.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.doc.defaultView.getSelection();a.modify("extend","left","lineboundary");a.modify("extend","right","lineboundary")},_selectLine_MSIE:function(){var a=this.doc.selection.createRange(),b=a.boundingTop,c=this.doc.body.scrollWidth,f;if(a.moveToPoint){0===b&&(f=this.doc.createElement("span"),this.insertNode(f),b=f.offsetTop,
172
+f.parentNode.removeChild(f));b+=1;for(f=-10;f<c;f+=2)try{a.moveToPoint(f,b);break}catch(h){}for(f=this.doc.selection.createRange();0<=c;c--)try{f.moveToPoint(c,b);break}catch(i){}a.setEndPoint("EndToEnd",f);a.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes([a],b):[]},getRange:function(){var a=this.getSelection();return a&&a.rangeCount&&a.getRangeAt(0)},getSelection:function(){return rangy.getSelection(this.doc.defaultView||
173
+this.doc.parentWindow)},setSelection:function(a){return rangy.getSelection(this.doc.defaultView||this.doc.parentWindow).setSingleRange(a)}})})(wysihtml5);
174
+(function(b,c){function a(a,b){return c.dom.isCharacterDataNode(a)?0==b?!!a.previousSibling:b==a.length?!!a.nextSibling:!0:0<b&&b<a.childNodes.length}function d(a,b,e){var f;c.dom.isCharacterDataNode(b)&&(0==e?(e=c.dom.getNodeIndex(b),b=b.parentNode):e==b.length?(e=c.dom.getNodeIndex(b)+1,b=b.parentNode):f=c.dom.splitDataNode(b,e));if(!f){f=b.cloneNode(!1);f.id&&f.removeAttribute("id");for(var h;h=b.childNodes[e];)f.appendChild(h);c.dom.insertAfter(f,b)}return b==a?f:d(a,f.parentNode,c.dom.getNodeIndex(f))}
175
+function e(a){this.firstTextNode=(this.isElementMerge=a.nodeType==b.ELEMENT_NODE)?a.lastChild:a;this.textNodes=[this.firstTextNode]}function f(a,b,c,d){this.tagNames=a||[h];this.cssClass=b||"";this.similarClassRegExp=c;this.normalize=d;this.applyToAnyTagName=!1}var h="span",i=/\s+/g;e.prototype={doMerge:function(){for(var a=[],b,c,d=0,e=this.textNodes.length;d<e;++d)b=this.textNodes[d],c=b.parentNode,a[d]=b.data,d&&(c.removeChild(b),c.hasChildNodes()||c.parentNode.removeChild(c));return this.firstTextNode.data=
176
+a=a.join("")},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;b<c;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}};f.prototype={getAncestorWithClass:function(a){for(var d;a;){if(this.cssClass)if(d=this.cssClass,a.className){var e=a.className.match(this.similarClassRegExp)||[];d=e[e.length-1]===d}else d=!1;else d=!0;if(a.nodeType==b.ELEMENT_NODE&&c.dom.arrayContains(this.tagNames,
177
+a.tagName.toLowerCase())&&d)return a;a=a.parentNode}return!1},postApply:function(a,b){for(var c=a[0],d=a[a.length-1],f=[],h,i=c,m=d,s=0,x=d.length,o,z,w=0,y=a.length;w<y;++w)if(o=a[w],z=this.getAdjacentMergeableTextNode(o.parentNode,!1)){if(h||(h=new e(z),f.push(h)),h.textNodes.push(o),o===c&&(i=h.firstTextNode,s=i.length),o===d)m=h.firstTextNode,x=h.getLength()}else h=null;if(c=this.getAdjacentMergeableTextNode(d.parentNode,!0))h||(h=new e(d),f.push(h)),h.textNodes.push(c);if(f.length){w=0;for(y=
178
+f.length;w<y;++w)f[w].doMerge();b.setStart(i,s);b.setEnd(m,x)}},getAdjacentMergeableTextNode:function(a,c){var d=a.nodeType==b.TEXT_NODE,e=d?a.parentNode:a,f=c?"nextSibling":"previousSibling";if(d){if((d=a[f])&&d.nodeType==b.TEXT_NODE)return d}else if((d=e[f])&&this.areElementsMergeable(a,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,b){var d;if(d=c.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase()))if(d=c.dom.arrayContains(this.tagNames,(b.tagName||
179
+"").toLowerCase()))if(d=a.className.replace(i," ")==b.className.replace(i," "))a:if(a.attributes.length!=b.attributes.length)d=!1;else{d=0;for(var e=a.attributes.length,f,h;d<e;++d)if(f=a.attributes[d],h=f.name,"class"!=h&&(h=b.attributes.getNamedItem(h),f.specified!=h.specified||f.specified&&f.nodeValue!==h.nodeValue)){d=!1;break a}d=!0}return d},createContainer:function(a){a=a.createElement(this.tagNames[0]);this.cssClass&&(a.className=this.cssClass);return a},applyToTextNode:function(a){var b=
180
+a.parentNode;1==b.childNodes.length&&c.dom.arrayContains(this.tagNames,b.tagName.toLowerCase())?this.cssClass&&(a=this.cssClass,b.className?(b.className&&(b.className=b.className.replace(this.similarClassRegExp,"")),b.className+=" "+a):b.className=a):(b=this.createContainer(c.dom.getDocument(a)),a.parentNode.insertBefore(b,a),b.appendChild(a))},isRemovable:function(a){return c.dom.arrayContains(this.tagNames,a.tagName.toLowerCase())&&b.lang.string(a.className).trim()==this.cssClass},undoToTextNode:function(b,
181
+c,e){c.containsNode(e)||(b=c.cloneRange(),b.selectNode(e),b.isPointInRange(c.endContainer,c.endOffset)&&a(c.endContainer,c.endOffset)&&(d(e,c.endContainer,c.endOffset),c.setEndAfter(e)),b.isPointInRange(c.startContainer,c.startOffset)&&a(c.startContainer,c.startOffset)&&(e=d(e,c.startContainer,c.startOffset)));this.similarClassRegExp&&e.className&&(e.className=e.className.replace(this.similarClassRegExp,""));if(this.isRemovable(e)){c=e;for(e=c.parentNode;c.firstChild;)e.insertBefore(c.firstChild,
182
+c);e.removeChild(c)}},applyToRange:function(a){var c=a.getNodes([b.TEXT_NODE]);if(!c.length)try{var d=this.createContainer(a.endContainer.ownerDocument);a.surroundContents(d);this.selectNode(a,d);return}catch(e){}a.splitBoundaries();c=a.getNodes([b.TEXT_NODE]);if(c.length){for(var f=0,h=c.length;f<h;++f)d=c[f],this.getAncestorWithClass(d)||this.applyToTextNode(d);a.setStart(c[0],0);d=c[c.length-1];a.setEnd(d,d.length);this.normalize&&this.postApply(c,a)}},undoToRange:function(a){var c=a.getNodes([b.TEXT_NODE]),
183
+d,e;c.length?(a.splitBoundaries(),c=a.getNodes([b.TEXT_NODE])):(c=a.endContainer.ownerDocument.createTextNode(b.INVISIBLE_SPACE),a.insertNode(c),a.selectNode(c),c=[c]);for(var f=0,h=c.length;f<h;++f)d=c[f],(e=this.getAncestorWithClass(d))&&this.undoToTextNode(d,a,e);1==h?this.selectNode(a,c[0]):(a.setStart(c[0],0),d=c[c.length-1],a.setEnd(d,d.length),this.normalize&&this.postApply(c,a))},selectNode:function(a,c){var d=c.nodeType===b.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:
184
+c.data;if((f=""===f||f===b.INVISIBLE_SPACE)&&d&&e)try{c.innerHTML=b.INVISIBLE_SPACE}catch(h){}a.selectNodeContents(c);f&&d?a.collapse(!1):f&&(a.setStartAfter(c),a.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),d=d?d.toString():"";c.detach();return d},isAppliedToRange:function(a){var c=[],d,e=a.getNodes([b.TEXT_NODE]);if(!e.length)return(d=this.getAncestorWithClass(a.startContainer))?[d]:!1;for(var f=0,h=e.length,i;f<h;++f){i=
185
+this.getTextSelectedByRange(e[f],a);d=this.getAncestorWithClass(e[f]);if(""!=i&&!d)return!1;c.push(d)}return c},toggleRange:function(a){this.isAppliedToRange(a)?this.undoToRange(a):this.applyToRange(a)}};b.selection.HTMLApplier=f})(wysihtml5,rangy);
186
+wysihtml5.Commands=Base.extend({constructor:function(b){this.editor=b;this.composer=b.composer;this.doc=this.composer.doc},support:function(b){return wysihtml5.browser.supportsCommand(this.doc,b)},exec:function(b,c){var a=wysihtml5.commands[b],d=a&&a.exec;this.editor.fire("beforecommand:composer");if(d)return d.call(a,this.composer,b,c);try{return this.doc.execCommand(b,!1,c)}catch(e){}this.editor.fire("aftercommand:composer")},state:function(b,c){var a=wysihtml5.commands[b],d=a&&a.state;if(d)return d.call(a,
187
+this.composer,b,c);try{return this.doc.queryCommandState(b)}catch(e){return!1}},value:function(b){var c=wysihtml5.commands[b],a=c&&c.value;if(a)return a.call(c,this.composer,b);try{return this.doc.queryCommandValue(b)}catch(d){return null}}});(function(b){b.commands.bold={exec:function(c,a){return b.commands.formatInline.exec(c,a,"b")},state:function(c,a){return b.commands.formatInline.state(c,a,"b")},value:function(){}}})(wysihtml5);
188
+(function(b){function c(c,h){var i=c.doc,g="_wysihtml5-temp-"+ +new Date,k=0,j,q,n;b.commands.formatInline.exec(c,a,d,g,/non-matching-class/g);j=i.querySelectorAll(d+"."+g);for(g=j.length;k<g;k++)for(n in q=j[k],q.removeAttribute("class"),h)q.setAttribute(n,h[n]);k=q;1===g&&(n=e.getTextContent(q),g=!!q.querySelector("*"),n=""===n||n===b.INVISIBLE_SPACE,!g&&n&&(e.setTextContent(q,q.href),i=i.createTextNode(" "),c.selection.setAfter(q),c.selection.insertNode(i),k=i));c.selection.setAfter(k)}var a,d=
189
+"A",e=b.dom;b.commands.createLink={exec:function(a,b,d){var g=this.state(a,b);g?a.selection.executeAndRestore(function(){for(var a=g.length,b=0,c,d,f;b<a;b++)c=g[b],d=e.getParentElement(c,{nodeName:"code"}),f=e.getTextContent(c),f.match(e.autoLink.URL_REG_EXP)&&!d?e.renameElement(c,"code"):e.replaceWithChildNodes(c)}):(d="object"===typeof d?d:{href:d},c(a,d))},state:function(a,c){return b.commands.formatInline.state(a,c,"A")},value:function(){return a}}})(wysihtml5);
190
+(function(b){var c=/wysiwyg-font-size-[a-z]+/g;b.commands.fontSize={exec:function(a,d,e){return b.commands.formatInline.exec(a,d,"span","wysiwyg-font-size-"+e,c)},state:function(a,d,e){return b.commands.formatInline.state(a,d,"span","wysiwyg-font-size-"+e,c)},value:function(){}}})(wysihtml5);
191
+(function(b){var c=/wysiwyg-color-[a-z]+/g;b.commands.foreColor={exec:function(a,d,e){return b.commands.formatInline.exec(a,d,"span","wysiwyg-color-"+e,c)},state:function(a,d,e){return b.commands.formatInline.state(a,d,"span","wysiwyg-color-"+e,c)},value:function(){}}})(wysihtml5);
192
+(function(b){function c(a){for(a=a.previousSibling;a&&a.nodeType===b.TEXT_NODE&&!b.lang.string(a.data).trim();)a=a.previousSibling;return a}function a(a){for(a=a.nextSibling;a&&a.nodeType===b.TEXT_NODE&&!b.lang.string(a.data).trim();)a=a.nextSibling;return a}function d(a){return"BR"===a.nodeName||"block"===h.getStyle("display").from(a)?!0:!1}function e(a,c,d,e){if(e)var f=h.observe(a,"DOMNodeInserted",function(a){var a=a.target,c;a.nodeType===b.ELEMENT_NODE&&(c=h.getStyle("display").from(a),"inline"!==
193
+c.substr(0,6)&&(a.className+=" "+e))});a.execCommand(c,!1,d);f&&f.stop()}function f(b,d){b.selection.selectLine();b.selection.surround(d);var e=a(d),f=c(d);e&&"BR"===e.nodeName&&e.parentNode.removeChild(e);f&&"BR"===f.nodeName&&f.parentNode.removeChild(f);(e=d.lastChild)&&"BR"===e.nodeName&&e.parentNode.removeChild(e);b.selection.selectNode(d)}var h=b.dom,i="H1,H2,H3,H4,H5,H6,P,BLOCKQUOTE,DIV".split(",");b.commands.formatBlock={exec:function(g,k,j,q,n){var p=g.doc,r=this.state(g,k,j,q,n),m,j="string"===
194
+typeof j?j.toUpperCase():j;if(r)g.selection.executeAndRestoreSimple(function(){n&&(r.className=r.className.replace(n,""));var e=!!b.lang.string(r.className).trim();if(!e&&r.nodeName===(j||"DIV")){var e=r,f=e.ownerDocument,g=a(e),i=c(e);g&&!d(g)&&e.parentNode.insertBefore(f.createElement("br"),g);i&&!d(i)&&e.parentNode.insertBefore(f.createElement("br"),e);h.replaceWithChildNodes(r)}else e&&h.renameElement(r,"DIV")});else{if(null===j||b.lang.array(i).contains(j))if(m=g.selection.getSelectedNode(),
195
+r=h.getParentElement(m,{nodeName:i})){g.selection.executeAndRestoreSimple(function(){j&&(r=h.renameElement(r,j));if(q){var a=r;a.className?(a.className=a.className.replace(n,""),a.className+=" "+q):a.className=q}});return}g.commands.support(k)?e(p,k,j||"DIV",q):(r=p.createElement(j||"DIV"),q&&(r.className=q),f(g,r))}},state:function(a,b,c,d,e){c="string"===typeof c?c.toUpperCase():c;a=a.selection.getSelectedNode();return h.getParentElement(a,{nodeName:c,className:d,classRegExp:e})},value:function(){}}})(wysihtml5);
196
+(function(b){function c(c,f,h){var i=c+":"+f;if(!d[i]){var g=d,k=b.selection.HTMLApplier,j=a[c],c=j?[c.toLowerCase(),j.toLowerCase()]:[c.toLowerCase()];g[i]=new k(c,f,h,!0)}return d[i]}var a={strong:"b",em:"i",b:"strong",i:"em"},d={};b.commands.formatInline={exec:function(a,b,d,i,g){b=a.selection.getRange();if(!b)return!1;c(d,i,g).toggleRange(b);a.selection.setSelection(b)},state:function(d,f,h,i,g){var f=d.doc,k=a[h]||h;if(!b.dom.hasElementWithTagName(f,h)&&!b.dom.hasElementWithTagName(f,k)||i&&
197
+!b.dom.hasElementWithClassName(f,i))return!1;d=d.selection.getRange();return!d?!1:c(h,i,g).isAppliedToRange(d)},value:function(){}}})(wysihtml5);(function(b){b.commands.insertHTML={exec:function(b,a,d){b.commands.support(a)?b.doc.execCommand(a,!1,d):b.selection.insertHTML(d)},state:function(){return!1},value:function(){}}})(wysihtml5);
198
+(function(b){b.commands.insertImage={exec:function(c,a,d){var d="object"===typeof d?d:{src:d},e=c.doc,a=this.state(c),f;if(a)c.selection.setBefore(a),d=a.parentNode,d.removeChild(a),b.dom.removeEmptyTextNodes(d),"A"===d.nodeName&&!d.firstChild&&(c.selection.setAfter(d),d.parentNode.removeChild(d)),b.quirks.redraw(c.element);else{a=e.createElement("IMG");for(f in d)a[f]=d[f];c.selection.insertNode(a);b.browser.hasProblemsSettingCaretAfterImg()?(d=e.createTextNode(b.INVISIBLE_SPACE),c.selection.insertNode(d),
199
+c.selection.setAfter(d)):c.selection.setAfter(a)}},state:function(c){var a;if(!b.dom.hasElementWithTagName(c.doc,"IMG"))return!1;a=c.selection.getSelectedNode();if(!a)return!1;if("IMG"===a.nodeName)return a;if(a.nodeType!==b.ELEMENT_NODE)return!1;a=c.selection.getText();if(a=b.lang.string(a).trim())return!1;c=c.selection.getNodes(b.ELEMENT_NODE,function(a){return"IMG"===a.nodeName});return 1!==c.length?!1:c[0]},value:function(b){return(b=this.state(b))&&b.src}}})(wysihtml5);
200
+(function(b){var c="<br>"+(b.browser.needsSpaceAfterLineBreak()?" ":"");b.commands.insertLineBreak={exec:function(a,d){a.commands.support(d)?(a.doc.execCommand(d,!1,null),b.browser.autoScrollsToCaret()||a.selection.scrollIntoView()):a.commands.exec("insertHTML",c)},state:function(){return!1},value:function(){}}})(wysihtml5);
201
+(function(b){b.commands.insertOrderedList={exec:function(c,a){var d=c.doc,e,f,h;c.commands.support(a)?d.execCommand(a,!1,null):(e=c.selection.getSelectedNode(),(h=b.dom.getParentElement(e,{nodeName:["UL","OL"]},4))?c.selection.executeAndRestoreSimple(function(){"OL"===h.nodeName?b.dom.resolveList(h):("UL"===h.nodeName||"MENU"===h.nodeName)&&b.dom.renameElement(h,"ol")}):(f=d.createElement("span"),c.selection.surround(f),d=""===f.innerHTML||f.innerHTML===b.INVISIBLE_SPACE,c.selection.executeAndRestoreSimple(function(){h=
202
+b.dom.convertToList(f,"ol")}),d&&c.selection.selectNode(h.querySelector("li"))))},state:function(b,a){try{return b.doc.queryCommandState(a)}catch(d){return!1}},value:function(){}}})(wysihtml5);
203
+(function(b){b.commands.insertUnorderedList={exec:function(c,a){var d=c.doc,e,f,h;c.commands.support(a)?d.execCommand(a,!1,null):(e=c.selection.getSelectedNode(),(h=b.dom.getParentElement(e,{nodeName:["UL","OL"]}))?c.selection.executeAndRestoreSimple(function(){"UL"===h.nodeName?b.dom.resolveList(h):("OL"===h.nodeName||"MENU"===h.nodeName)&&b.dom.renameElement(h,"ul")}):(f=d.createElement("span"),c.selection.surround(f),d=""===f.innerHTML||f.innerHTML===b.INVISIBLE_SPACE,c.selection.executeAndRestoreSimple(function(){h=
204
+b.dom.convertToList(f,"ul")}),d&&c.selection.selectNode(h.querySelector("li"))))},state:function(b,a){try{return b.doc.queryCommandState(a)}catch(d){return!1}},value:function(){}}})(wysihtml5);(function(b){b.commands.italic={exec:function(c,a){return b.commands.formatInline.exec(c,a,"i")},state:function(c,a){return b.commands.formatInline.state(c,a,"i")},value:function(){}}})(wysihtml5);
205
+(function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyCenter={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-center",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-center",c)},value:function(){}}})(wysihtml5);
206
+(function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyLeft={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-left",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-left",c)},value:function(){}}})(wysihtml5);
207
+(function(b){var c=/wysiwyg-text-align-[a-z]+/g;b.commands.justifyRight={exec:function(a){return b.commands.formatBlock.exec(a,"formatBlock",null,"wysiwyg-text-align-right",c)},state:function(a){return b.commands.formatBlock.state(a,"formatBlock",null,"wysiwyg-text-align-right",c)},value:function(){}}})(wysihtml5);
208
+(function(b){var c=/wysiwyg-text-decoration-underline/g;b.commands.underline={exec:function(a,d){return b.commands.formatInline.exec(a,d,"span","wysiwyg-text-decoration-underline",c)},state:function(a,d){return b.commands.formatInline.state(a,d,"span","wysiwyg-text-decoration-underline",c)},value:function(){}}})(wysihtml5);
209
+(function(b){var c='<span id="_wysihtml5-undo" class="_wysihtml5-temp">'+b.INVISIBLE_SPACE+"</span>",a='<span id="_wysihtml5-redo" class="_wysihtml5-temp">'+b.INVISIBLE_SPACE+"</span>",d=b.dom;b.UndoManager=b.lang.Dispatcher.extend({constructor:function(a){this.editor=a;this.composer=a.composer;this.element=this.composer.element;this.history=[this.composer.getValue()];this.position=1;this.composer.commands.support("insertHTML")&&this._observe()},_observe:function(){var e=this,f=this.composer.sandbox.getDocument(),
210
+h;d.observe(this.element,"keydown",function(a){if(!(a.altKey||!a.ctrlKey&&!a.metaKey)){var b=a.keyCode,c=90===b&&a.shiftKey||89===b;90===b&&!a.shiftKey?(e.undo(),a.preventDefault()):c&&(e.redo(),a.preventDefault())}});d.observe(this.element,"keydown",function(a){a=a.keyCode;a!==h&&(h=a,(8===a||46===a)&&e.transact())});if(b.browser.hasUndoInContextMenu()){var i,g,k=function(){for(var a;a=f.querySelector("._wysihtml5-temp");)a.parentNode.removeChild(a);clearInterval(i)};d.observe(this.element,"contextmenu",
211
+function(){k();e.composer.selection.executeAndRestoreSimple(function(){e.element.lastChild&&e.composer.selection.setAfter(e.element.lastChild);f.execCommand("insertHTML",!1,c);f.execCommand("insertHTML",!1,a);f.execCommand("undo",!1,null)});i=setInterval(function(){f.getElementById("_wysihtml5-redo")?(k(),e.redo()):f.getElementById("_wysihtml5-undo")||(k(),e.undo())},400);g||(g=!0,d.observe(document,"mousedown",k),d.observe(f,["mousedown","paste","cut","copy"],k))})}this.editor.observe("newword:composer",
212
+function(){e.transact()}).observe("beforecommand:composer",function(){e.transact()})},transact:function(){var a=this.history[this.position-1],b=this.composer.getValue();if(b!=a){if(40<(this.history.length=this.position))this.history.shift(),this.position--;this.position++;this.history.push(b)}},undo:function(){this.transact();1>=this.position||(this.set(this.history[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.position>=this.history.length||(this.set(this.history[++this.position-
213
+1]),this.editor.fire("redo:composer"))},set:function(a){this.composer.setValue(a);this.editor.focus(!0)}})})(wysihtml5);
214
+wysihtml5.views.View=Base.extend({constructor:function(b,c,a){this.parent=b;this.element=c;this.config=a;this._observeViewChange()},_observeViewChange:function(){var b=this;this.parent.observe("beforeload",function(){b.parent.observe("change_view",function(c){c===b.name?(b.parent.currentView=b,b.show(),setTimeout(function(){b.focus()},0)):b.hide()})})},focus:function(){if(this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element.focus()}catch(b){}},hide:function(){this.element.style.display=
215
+"none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}});
216
+(function(b){var c=b.dom,a=b.browser;b.views.Composer=b.views.View.extend({name:"composer",CARET_HACK:"<br>",constructor:function(a,b,c){this.base(a,b,c);this.textarea=this.parent.textarea;this._initSandbox()},clear:function(){this.element.innerHTML=a.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(a){var c=this.isEmpty()?"":b.quirks.getCorrectInnerHTML(this.element);a&&(c=this.parent.parse(c));return c=b.lang.string(c).replace(b.INVISIBLE_SPACE).by("")},setValue:function(a,
217
+b){b&&(a=this.parent.parse(a));this.element.innerHTML=a},show:function(){this.iframe.style.display=this._displayStyle||"";this.disable();this.enable()},hide:function(){this._displayStyle=c.getStyle("display").from(this.iframe);"none"===this._displayStyle&&(this._displayStyle=null);this.iframe.style.display="none"},disable:function(){this.element.removeAttribute("contentEditable");this.base()},enable:function(){this.element.setAttribute("contentEditable","true");this.base()},focus:function(a){b.browser.doesAsyncFocus()&&
218
+this.hasPlaceholderSet()&&this.clear();this.base();var c=this.element.lastChild;a&&c&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getTextContent:function(){return c.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==this.textarea.element.getAttribute("placeholder")},isEmpty:function(){var a=this.element.innerHTML;return""===a||a===this.CARET_HACK||this.hasPlaceholderSet()||""===this.getTextContent()&&
219
+!this.element.querySelector("blockquote, ul, ol, img, embed, object, table, iframe, svg, video, audio, button, input, select, textarea")},_initSandbox:function(){var a=this;this.sandbox=new c.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets});this.iframe=this.sandbox.getIframe();var b=document.createElement("input");b.type="hidden";b.name="_wysihtml5_mode";b.value=1;var f=this.textarea.element;c.insert(this.iframe).after(f);c.insert(b).after(f)},_create:function(){var d=this;this.doc=
220
+this.sandbox.getDocument();this.element=this.doc.body;this.textarea=this.parent.textarea;this.element.innerHTML=this.textarea.getValue(!0);this.enable();this.selection=new b.Selection(this.parent);this.commands=new b.Commands(this.parent);c.copyAttributes("className,spellcheck,title,lang,dir,accessKey".split(",")).from(this.textarea.element).to(this.element);c.addClass(this.element,this.config.composerClassName);this.config.style&&this.style();this.observe();var e=this.config.name;e&&(c.addClass(this.element,
221
+e),c.addClass(this.iframe,e));(e="string"===typeof this.config.placeholder?this.config.placeholder:this.textarea.element.getAttribute("placeholder"))&&c.simulatePlaceholder(this.parent,this,e);this.commands.exec("styleWithCSS",!1);this._initAutoLinking();this._initObjectResizing();this._initUndoManager();(this.textarea.element.hasAttribute("autofocus")||document.querySelector(":focus")==this.textarea.element)&&setTimeout(function(){d.focus()},100);b.quirks.insertLineBreakOnReturn(this);a.clearsContentEditableCorrectly()||
222
+b.quirks.ensureProperClearing(this);a.clearsListsInContentEditableCorrectly()||b.quirks.ensureProperClearingOfLists(this);this.initSync&&this.config.sync&&this.initSync();this.textarea.hide();this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=a.canDisableAutoLinking(),f=a.doesAutoLinkingInContentEditable();e&&this.commands.exec("autoUrlDetect",!1);if(this.config.autoLink){(!f||f&&e)&&this.parent.observe("newword:composer",function(){d.selection.executeAndRestore(function(a,
223
+b){c.autoLink(b.parentNode)})});var h=this.sandbox.getDocument().getElementsByTagName("a"),i=c.autoLink.URL_REG_EXP,g=function(a){a=b.lang.string(c.getTextContent(a)).trim();"www."===a.substr(0,4)&&(a="http://"+a);return a};c.observe(this.element,"keydown",function(a){if(h.length){var a=d.selection.getSelectedNode(a.target.ownerDocument),b=c.getParentElement(a,{nodeName:"A"},4),e;b&&(e=g(b),setTimeout(function(){var a=g(b);a!==e&&a.match(i)&&b.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){var d=
224
+["width","height"],e=d.length,f=this.element;this.commands.exec("enableObjectResizing",this.config.allowObjectResizing);this.config.allowObjectResizing?a.supportsEvent("resizeend")&&c.observe(f,"resizeend",function(a){for(var a=a.target||a.srcElement,c=a.style,g=0,k;g<e;g++)k=d[g],c[k]&&(a.setAttribute(k,parseInt(c[k],10)),c[k]="");b.quirks.redraw(f)}):a.supportsEvent("resizestart")&&c.observe(f,"resizestart",function(a){a.preventDefault()})},_initUndoManager:function(){new b.UndoManager(this.parent)}})})(wysihtml5);
225
+(function(b){var c=b.dom,a=document,d=window,e=a.createElement("div"),f="background-color,color,cursor,font-family,font-size,font-style,font-variant,font-weight,line-height,letter-spacing,text-align,text-decoration,text-indent,text-rendering,word-break,word-wrap,word-spacing".split(","),h="background-color,border-collapse,border-bottom-color,border-bottom-style,border-bottom-width,border-left-color,border-left-style,border-left-width,border-right-color,border-right-style,border-right-width,border-top-color,border-top-style,border-top-width,clear,display,float,margin-bottom,margin-left,margin-right,margin-top,outline-color,outline-offset,outline-width,outline-style,padding-left,padding-right,padding-top,padding-bottom,position,top,left,right,bottom,z-index,vertical-align,text-align,-webkit-box-sizing,-moz-box-sizing,-ms-box-sizing,box-sizing,-webkit-box-shadow,-moz-box-shadow,-ms-box-shadow,box-shadow,-webkit-border-top-right-radius,-moz-border-radius-topright,border-top-right-radius,-webkit-border-bottom-right-radius,-moz-border-radius-bottomright,border-bottom-right-radius,-webkit-border-bottom-left-radius,-moz-border-radius-bottomleft,border-bottom-left-radius,-webkit-border-top-left-radius,-moz-border-radius-topleft,border-top-left-radius,width,height".split(","),
226
+i="width,height,top,left,right,bottom".split(","),g=["html             { height: 100%; }","body             { min-height: 100%; padding: 0; margin: 0; margin-top: -1px; padding-top: 1px; }","._wysihtml5-temp { display: none; }",b.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","body[disabled]   { background-color: #eee !important; color: #999 !important; cursor: default !important; }","img:-moz-broken  { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],
227
+k=function(b){if(b.setActive)try{b.setActive()}catch(e){}else{var f=b.style,g=a.documentElement.scrollTop||a.body.scrollTop,h=a.documentElement.scrollLeft||a.body.scrollLeft,f={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};c.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(b);b.focus();c.setStyles(f).on(b);d.scrollTo&&d.scrollTo(h,g)}};b.views.Composer.prototype.style=function(){var j=this,q=a.querySelector(":focus"),n=this.textarea.element,
228
+p=n.hasAttribute("placeholder"),r=p&&n.getAttribute("placeholder");this.focusStylesHost=this.focusStylesHost||e.cloneNode(!1);this.blurStylesHost=this.blurStylesHost||e.cloneNode(!1);p&&n.removeAttribute("placeholder");n===q&&n.blur();c.copyStyles(h).from(n).to(this.iframe).andTo(this.blurStylesHost);c.copyStyles(f).from(n).to(this.element).andTo(this.blurStylesHost);c.insertCSS(g).into(this.element.ownerDocument);k(n);c.copyStyles(h).from(n).to(this.focusStylesHost);c.copyStyles(f).from(n).to(this.focusStylesHost);
229
+var m=b.lang.array(h).without(["display"]);q?q.focus():n.blur();p&&n.setAttribute("placeholder",r);b.browser.hasCurrentStyleProperty()||c.observe(d,"resize",function(){var a=c.getStyle("display").from(n);n.style.display="";c.copyStyles(i).from(n).to(j.iframe).andTo(j.focusStylesHost).andTo(j.blurStylesHost);n.style.display=a});this.parent.observe("focus:composer",function(){c.copyStyles(m).from(j.focusStylesHost).to(j.iframe);c.copyStyles(f).from(j.focusStylesHost).to(j.element)});this.parent.observe("blur:composer",
230
+function(){c.copyStyles(m).from(j.blurStylesHost).to(j.iframe);c.copyStyles(f).from(j.blurStylesHost).to(j.element)});return this}})(wysihtml5);
231
+(function(b){var c=b.dom,a=b.browser,d={66:"bold",73:"italic",85:"underline"};b.views.Composer.prototype.observe=function(){var e=this,f=this.getValue(),h=this.sandbox.getIframe(),i=this.element,g=a.supportsEventsInIframeCorrectly()?i:this.sandbox.getWindow(),k=a.supportsEvent("drop")?["drop","paste"]:["dragdrop","paste"];c.observe(h,"DOMNodeRemoved",function(){clearInterval(j);e.parent.fire("destroy:composer")});var j=setInterval(function(){c.contains(document.documentElement,h)||(clearInterval(j),
232
+e.parent.fire("destroy:composer"))},250);c.observe(g,"focus",function(){e.parent.fire("focus").fire("focus:composer");setTimeout(function(){f=e.getValue()},0)});c.observe(g,"blur",function(){f!==e.getValue()&&e.parent.fire("change").fire("change:composer");e.parent.fire("blur").fire("blur:composer")});b.browser.isIos()&&c.observe(i,"blur",function(){var a=i.ownerDocument.createElement("input"),b=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;
233
+try{e.selection.insertNode(a)}catch(d){i.appendChild(a)}a.focus();a.parentNode.removeChild(a);window.scrollTo(c,b)});c.observe(i,"dragenter",function(){e.parent.fire("unset_placeholder")});a.firesOnDropOnlyWhenOnDragOverIsCancelled()&&c.observe(i,["dragover","dragenter"],function(a){a.preventDefault()});c.observe(i,k,function(b){var c=b.dataTransfer,d;c&&a.supportsDataTransfer()&&(d=c.getData("text/html")||c.getData("text/plain"));d?(i.focus(),e.commands.exec("insertHTML",d),e.parent.fire("paste").fire("paste:composer"),
234
+b.stopPropagation(),b.preventDefault()):setTimeout(function(){e.parent.fire("paste").fire("paste:composer")},0)});c.observe(i,"keyup",function(a){a=a.keyCode;(a===b.SPACE_KEY||a===b.ENTER_KEY)&&e.parent.fire("newword:composer")});this.parent.observe("paste:composer",function(){setTimeout(function(){e.parent.fire("newword:composer")},0)});a.canSelectImagesInContentEditable()||c.observe(i,"mousedown",function(a){var b=a.target;"IMG"===b.nodeName&&(e.selection.selectNode(b),a.preventDefault())});c.observe(i,
235
+"keydown",function(a){var b=d[a.keyCode];if((a.ctrlKey||a.metaKey)&&b)e.commands.exec(b),a.preventDefault()});c.observe(i,"keydown",function(a){var c=e.selection.getSelectedNode(!0),d=a.keyCode;if(c&&"IMG"===c.nodeName&&(d===b.BACKSPACE_KEY||d===b.DELETE_KEY))d=c.parentNode,d.removeChild(c),"A"===d.nodeName&&!d.firstChild&&d.parentNode.removeChild(d),setTimeout(function(){b.quirks.redraw(i)},0),a.preventDefault()});var q={IMG:"Image: ",A:"Link: "};c.observe(i,"mouseover",function(a){var a=a.target,
236
+b=a.nodeName;"A"!==b&&"IMG"!==b||(b=q[b]+(a.getAttribute("href")||a.getAttribute("src")),a.setAttribute("title",b))})}})(wysihtml5);
237
+(function(b){b.views.Synchronizer=Base.extend({constructor:function(b,a,d){this.editor=b;this.textarea=a;this.composer=d;this._observe()},fromComposerToTextarea:function(c){this.textarea.setValue(b.lang.string(this.composer.getValue()).trim(),c)},fromTextareaToComposer:function(b){var a=this.textarea.getValue();a?this.composer.setValue(a,b):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(b){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(b):this.fromComposerToTextarea(b)},
238
+_observe:function(){var c,a=this,d=this.textarea.element.form,e=function(){c=setInterval(function(){a.fromComposerToTextarea()},400)},f=function(){clearInterval(c);c=null};e();d&&(b.dom.observe(d,"submit",function(){a.sync(!0)}),b.dom.observe(d,"reset",function(){setTimeout(function(){a.fromTextareaToComposer()},0)}));this.editor.observe("change_view",function(b){if(b==="composer"&&!c){a.fromTextareaToComposer(true);e()}else if(b==="textarea"){a.fromComposerToTextarea(true);f()}});this.editor.observe("destroy:composer",
239
+f)}})})(wysihtml5);
240
+wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(b,c,a){this.base(b,c,a);this._observe()},clear:function(){this.element.value=""},getValue:function(b){var c=this.isEmpty()?"":this.element.value;b&&(c=this.parent.parse(c));return c},setValue:function(b,c){c&&(b=this.parent.parse(b));this.element.value=b},hasPlaceholderSet:function(){var b=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),c=this.element.getAttribute("placeholder")||null,a=this.element.value;
241
+return b&&!a||a===c},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var b=this.element,c=this.parent,a={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];c.observe("beforeload",function(){wysihtml5.dom.observe(b,d,function(b){b=a[b.type]||b.type;c.fire(b).fire(b+":textarea")});wysihtml5.dom.observe(b,["paste","drop"],function(){setTimeout(function(){c.fire("paste").fire("paste:textarea")},
242
+0)})})}});
243
+(function(b){var c=b.dom;b.toolbar.Dialog=b.lang.Dispatcher.extend({constructor:function(a,b){this.link=a;this.container=b},_observe:function(){if(!this._observed){var a=this,d=function(b){var c=a._serialize();c==a.elementToChange?a.fire("edit",c):a.fire("save",c);a.hide();b.preventDefault();b.stopPropagation()};c.observe(a.link,"click",function(){c.hasClass(a.link,"wysihtml5-command-dialog-opened")&&setTimeout(function(){a.hide()},0)});c.observe(this.container,"keydown",function(c){var e=c.keyCode;
244
+e===b.ENTER_KEY&&d(c);e===b.ESCAPE_KEY&&a.hide()});c.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",d);c.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(b){a.fire("cancel");a.hide();b.preventDefault();b.stopPropagation()});for(var e=this.container.querySelectorAll("input, select, textarea"),f=0,h=e.length,i=function(){clearInterval(a.interval)};f<h;f++)c.observe(e[f],"change",i);this._observed=!0}},_serialize:function(){for(var a=this.elementToChange||
245
+{},b=this.container.querySelectorAll("[data-wysihtml5-dialog-field]"),c=b.length,f=0;f<c;f++)a[b[f].getAttribute("data-wysihtml5-dialog-field")]=b[f].value;return a},_interpolate:function(a){for(var b,c,f=document.querySelector(":focus"),h=this.container.querySelectorAll("[data-wysihtml5-dialog-field]"),i=h.length,g=0;g<i;g++)b=h[g],b!==f&&!(a&&"hidden"===b.type)&&(c=b.getAttribute("data-wysihtml5-dialog-field"),c=this.elementToChange?this.elementToChange[c]||"":b.defaultValue,b.value=c)},show:function(a){var b=
246
+this,e=this.container.querySelector("input, select, textarea");this.elementToChange=a;this._observe();this._interpolate();a&&(this.interval=setInterval(function(){b._interpolate(!0)},500));c.addClass(this.link,"wysihtml5-command-dialog-opened");this.container.style.display="";this.fire("show");if(e&&!a)try{e.focus()}catch(f){}},hide:function(){clearInterval(this.interval);this.elementToChange=null;c.removeClass(this.link,"wysihtml5-command-dialog-opened");this.container.style.display="none";this.fire("hide")}})})(wysihtml5);
247
+(function(b){var c=b.dom,a={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};b.toolbar.Speech=function(h,i){var g=document.createElement("input");if(b.browser.supportsSpeechApiOn(g)){var k=document.createElement("div");b.lang.object(d).merge({width:i.offsetWidth+"px",height:i.offsetHeight+
248
+"px"});c.insert(g).into(k);c.insert(k).into(i);c.setStyles(e).on(g);c.setAttributes(f).on(g);c.setStyles(d).on(k);c.setStyles(a).on(i);c.observe(g,"onwebkitspeechchange"in g?"webkitspeechchange":"speechchange",function(){h.execCommand("insertText",g.value);g.value=""});c.observe(g,"click",function(a){c.hasClass(i,"wysihtml5-command-disabled")&&a.preventDefault();a.stopPropagation()})}else i.style.display="none"}})(wysihtml5);
249
+(function(b){var c=b.dom;b.toolbar.Toolbar=Base.extend({constructor:function(a,c){this.editor=a;this.container="string"===typeof c?document.getElementById(c):c;this.composer=a.composer;this._getLinks("command");this._getLinks("action");this._observe();this.show();for(var e=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),f=e.length,h=0;h<f;h++)new b.toolbar.Speech(this,e[h])},_getLinks:function(a){for(var c=this[a+"Links"]=b.lang.array(this.container.querySelectorAll("a[data-wysihtml5-"+
250
+a+"]")).get(),e=c.length,f=0,h=this[a+"Mapping"]={},i,g,k,j;f<e;f++)i=c[f],g=i.getAttribute("data-wysihtml5-"+a),k=i.getAttribute("data-wysihtml5-"+a+"-value"),j=this._getDialog(i,g),h[g+":"+k]={link:i,name:g,value:k,dialog:j,state:!1}},_getDialog:function(a,c){var e=this,f=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']"),h,i;f&&(h=new b.toolbar.Dialog(a,f),h.observe("show",function(){i=e.composer.selection.getBookmark();e.editor.fire("show:dialog",{command:c,dialogContainer:f,commandLink:a})}),
251
+h.observe("save",function(b){i&&e.composer.selection.setBookmark(i);e._execCommand(c,b);e.editor.fire("save:dialog",{command:c,dialogContainer:f,commandLink:a})}),h.observe("cancel",function(){e.editor.focus(!1);e.editor.fire("cancel:dialog",{command:c,dialogContainer:f,commandLink:a})}));return h},execCommand:function(a,b){if(!this.commandsDisabled){var c=this.commandMapping[a+":"+b];c&&c.dialog&&!c.state?c.dialog.show():this._execCommand(a,b)}},_execCommand:function(a,b){this.editor.focus(!1);this.composer.commands.exec(a,
252
+b);this._updateLinkStates()},execAction:function(a){var b=this.editor;switch(a){case "change_view":b.currentView===b.textarea?b.fire("change_view","composer"):b.fire("change_view","textarea")}},_observe:function(){for(var a=this,b=this.editor,e=this.container,f=this.commandLinks.concat(this.actionLinks),h=f.length,i=0;i<h;i++)c.setAttributes({href:"javascript:;",unselectable:"on"}).on(f[i]);c.delegate(e,"[data-wysihtml5-command]","mousedown",function(a){a.preventDefault()});c.delegate(e,"[data-wysihtml5-command]",
253
+"click",function(b){var c=this.getAttribute("data-wysihtml5-command"),d=this.getAttribute("data-wysihtml5-command-value");a.execCommand(c,d);b.preventDefault()});c.delegate(e,"[data-wysihtml5-action]","click",function(b){var c=this.getAttribute("data-wysihtml5-action");a.execAction(c);b.preventDefault()});b.observe("focus:composer",function(){a.bookmark=null;clearInterval(a.interval);a.interval=setInterval(function(){a._updateLinkStates()},500)});b.observe("blur:composer",function(){clearInterval(a.interval)});
254
+b.observe("destroy:composer",function(){clearInterval(a.interval)});b.observe("change_view",function(b){setTimeout(function(){a.commandsDisabled="composer"!==b;a._updateLinkStates();a.commandsDisabled?c.addClass(e,"wysihtml5-commands-disabled"):c.removeClass(e,"wysihtml5-commands-disabled")},0)})},_updateLinkStates:function(){var a=this.commandMapping,d,e,f;for(d in a)if(f=a[d],this.commandsDisabled?(e=!1,c.removeClass(f.link,"wysihtml5-command-active"),f.dialog&&f.dialog.hide()):(e=this.composer.commands.state(f.name,
255
+f.value),b.lang.object(e).isArray()&&(e=1===e.length?e[0]:!0),c.removeClass(f.link,"wysihtml5-command-disabled")),f.state!==e)(f.state=e)?(c.addClass(f.link,"wysihtml5-command-active"),f.dialog&&("object"===typeof e?f.dialog.show(e):f.dialog.hide())):(c.removeClass(f.link,"wysihtml5-command-active"),f.dialog&&f.dialog.hide())},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})})(wysihtml5);
256
+(function(b){var c={name:void 0,style:!0,toolbar:void 0,autoLink:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},parser:b.dom.parse,composerClassName:"wysihtml5-editor",bodyClassName:"wysihtml5-supported",stylesheets:[],placeholderText:void 0,allowObjectResizing:!0,supportTouchDevices:!0};b.Editor=b.lang.Dispatcher.extend({constructor:function(a,d){this.textareaElement="string"===typeof a?document.getElementById(a):a;this.config=b.lang.object({}).merge(c).merge(d).get();this.currentView=
257
+this.textarea=new b.views.Textarea(this,this.textareaElement,this.config);this._isCompatible=b.browser.supported();if(!this._isCompatible||!this.config.supportTouchDevices&&b.browser.isTouchDevice()){var e=this;setTimeout(function(){e.fire("beforeload").fire("load")},0)}else{b.dom.addClass(document.body,this.config.bodyClassName);this.currentView=this.composer=new b.views.Composer(this,this.textareaElement,this.config);"function"===typeof this.config.parser&&this._initParser();this.observe("beforeload",
258
+function(){this.synchronizer=new b.views.Synchronizer(this,this.textarea,this.composer);this.config.toolbar&&(this.toolbar=new b.toolbar.Toolbar(this,this.config.toolbar))});try{console.log("Heya! This page is using wysihtml5 for rich text editing. Check out https://github.com/xing/wysihtml5")}catch(f){}}},isCompatible:function(){return this._isCompatible},clear:function(){this.currentView.clear();return this},getValue:function(a){return this.currentView.getValue(a)},setValue:function(a,b){if(!a)return this.clear();
259
+this.currentView.setValue(a,b);return this},focus:function(a){this.currentView.focus(a);return this},disable:function(){this.currentView.disable();return this},enable:function(){this.currentView.enable();return this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(a){var c=this.config.parser(a,this.config.parserRules,this.composer.sandbox.getDocument(),!0);"object"===typeof a&&b.quirks.redraw(a);return c},
260
+_initParser:function(){this.observe("paste:composer",function(){var a=this;a.composer.selection.executeAndRestore(function(){b.quirks.cleanPastedHTML(a.composer.element);a.parse(a.composer.element)},!0)});this.observe("paste:textarea",function(){this.textarea.setValue(this.parse(this.textarea.getValue()))})}})})(wysihtml5);

File diff suppressed because it is too large
+ 9 - 0
pboard/pboard/public/css/bootstrap-responsive.min.css


File diff suppressed because it is too large
+ 9 - 0
pboard/pboard/public/css/bootstrap.min.css


+ 418 - 0
pboard/pboard/public/css/glyphicons.css View File

@@ -0,0 +1,418 @@
1
+[class^="icon-g-"], 
2
+[class*=" icon-g-"] {
3
+    background-image: url("../img/glyphicons.png");
4
+}
5
+
6
+[class^="icon-g-grey"], 
7
+[class*=" icon-g-grey"] {
8
+    background-image: url("../img/glyphicons-grey.png");
9
+}
10
+
11
+[class^="icon-g-white"], 
12
+[class*=" icon-g-white"] {
13
+    background-image: url("../img/glyphicons-white.png");
14
+}
15
+
16
+.icon-g-white{}
17
+
18
+
19
+.icon-g-glass { background-position: 0 0 }
20
+.icon-g-leaf { background-position: -34px 0 }
21
+.icon-g-dog { background-position: -68px 0 }
22
+.icon-g-user { background-position: -102px 0 }
23
+.icon-g-girl { background-position: -136px 0 }
24
+.icon-g-car { background-position: -170px 0 }
25
+.icon-g-user-add { background-position: -204px 0 }
26
+.icon-g-user-remove { background-position: -238px 0 }
27
+.icon-g-film { background-position: -272px 0 }
28
+.icon-g-magic { background-position: -306px 0 }
29
+.icon-g-envelope { background-position: -340px 0 }
30
+.icon-g-camera { background-position: -374px 0 }
31
+.icon-g-heart { background-position: -408px 0 }
32
+.icon-g-beach-umbrella { background-position: -442px 0 }
33
+.icon-g-train { background-position: -476px 0 }
34
+.icon-g-print { background-position: -510px 0 }
35
+.icon-g-bin { background-position: -544px 0 }
36
+.icon-g-music { background-position: -578px 0 }
37
+.icon-g-note { background-position: -612px 0 }
38
+.icon-g-cogwheel { background-position: -646px 0 }
39
+.icon-g-home { background-position: -680px 0 }
40
+.icon-g-snowflake { background-position: -714px 0 }
41
+.icon-g-fire { background-position: -748px 0 }
42
+.icon-g-cogwheels { background-position: -782px 0 }
43
+.icon-g-parents { background-position: -816px 0 }
44
+.icon-g-binoculars { background-position: -850px 0 }
45
+.icon-g-road { background-position: -884px 0 }
46
+.icon-g-search { background-position: -918px 0 }
47
+.icon-g-cars { background-position: -952px 0 }
48
+.icon-g-notes-2 { background-position: -986px 0 }
49
+.icon-g-pencil { background-position: -1020px 0 }
50
+.icon-g-bus { background-position: -1054px 0 }
51
+.icon-g-wifi-alt { background-position: -1088px 0 }
52
+.icon-g-luggage { background-position: -1122px 0 }
53
+.icon-g-old-man { background-position: -1156px 0 }
54
+.icon-g-woman { background-position: -1190px 0 }
55
+.icon-g-file { background-position: -1224px 0 }
56
+.icon-g-credit { background-position: -1258px 0 }
57
+.icon-g-airplane { background-position: -1292px 0 }
58
+.icon-g-notes { background-position: -1326px 0 }
59
+.icon-g-stats { background-position: -1360px 0 }
60
+.icon-g-charts { background-position: -1394px 0 }
61
+.icon-g-pie-chart { background-position: -1428px 0 }
62
+.icon-g-group { background-position: -1462px 0 }
63
+.icon-g-keys { background-position: -1496px 0 }
64
+.icon-g-calendar { background-position: -1530px 0 }
65
+.icon-g-router { background-position: -1564px 0 }
66
+.icon-g-camera-small { background-position: -1598px 0 }
67
+.icon-g-dislikes { background-position: -1632px 0 }
68
+.icon-g-star { background-position: -1666px 0 }
69
+.icon-g-link { background-position: -1700px 0 }
70
+.icon-g-eye-open { background-position: -1734px 0 }
71
+.icon-g-eye-close { background-position: -1768px 0 }
72
+.icon-g-alarm { background-position: -1802px 0 }
73
+.icon-g-clock { background-position: -1836px 0 }
74
+.icon-g-stopwatch { background-position: -1870px 0 }
75
+.icon-g-projector { background-position: -1904px 0 }
76
+.icon-g-history { background-position: -1938px 0 }
77
+.icon-g-truck { background-position: -1972px 0 }
78
+.icon-g-cargo { background-position: 0 -34px }
79
+.icon-g-compass { background-position: -34px -34px }
80
+.icon-g-keynote { background-position: -68px -34px }
81
+.icon-g-attach { background-position: -102px -34px }
82
+.icon-g-power { background-position: -136px -34px }
83
+.icon-g-lightbulb { background-position: -170px -34px }
84
+.icon-g-tag { background-position: -204px -34px }
85
+.icon-g-tags { background-position: -238px -34px }
86
+.icon-g-cleaning { background-position: -272px -34px }
87
+.icon-g-ruller { background-position: -306px -34px }
88
+.icon-g-gift { background-position: -340px -34px }
89
+.icon-g-umbrella { background-position: -374px -34px }
90
+.icon-g-book { background-position: -408px -34px }
91
+.icon-g-bookmark { background-position: -442px -34px }
92
+.icon-g-signal { background-position: -476px -34px }
93
+.icon-g-cup { background-position: -510px -34px }
94
+.icon-g-stroller { background-position: -544px -34px }
95
+.icon-g-headphones { background-position: -578px -34px }
96
+.icon-g-headset { background-position: -612px -34px }
97
+.icon-g-warning-sign { background-position: -646px -34px }
98
+.icon-g-signal { background-position: -680px -34px }
99
+.icon-g-retweet { background-position: -714px -34px }
100
+.icon-g-refresh { background-position: -748px -34px }
101
+.icon-g-roundabout { background-position: -782px -34px }
102
+.icon-g-random { background-position: -816px -34px }
103
+.icon-g-heat { background-position: -850px -34px }
104
+.icon-g-repeat { background-position: -884px -34px }
105
+.icon-g-display { background-position: -918px -34px }
106
+.icon-g-log-book { background-position: -952px -34px }
107
+.icon-g-adress-book { background-position: -986px -34px }
108
+.icon-g-magnet { background-position: -1020px -34px }
109
+.icon-g-table { background-position: -1054px -34px }
110
+.icon-g-adjust { background-position: -1088px -34px }
111
+.icon-g-tint { background-position: -1122px -34px }
112
+.icon-g-crop { background-position: -1156px -34px }
113
+.icon-g-vector-path-square { background-position: -1190px -34px }
114
+.icon-g-vector-path-circle { background-position: -1224px -34px }
115
+.icon-g-vector-path-polygon { background-position: -1258px -34px }
116
+.icon-g-vector-path-line { background-position: -1292px -34px }
117
+.icon-g-vector-path-curve { background-position: -1326px -34px }
118
+.icon-g-vector-path-all { background-position: -1360px -34px }
119
+.icon-g-font { background-position: -1394px -34px }
120
+.icon-g-italic { background-position: -1428px -34px }
121
+.icon-g-bold { background-position: -1462px -34px }
122
+.icon-g-text-underline { background-position: -1496px -34px }
123
+.icon-g-text-strike { background-position: -1530px -34px }
124
+.icon-g-text-height { background-position: -1564px -34px }
125
+.icon-g-text-width { background-position: -1598px -34px }
126
+.icon-g-text-resize { background-position: -1632px -34px }
127
+.icon-g-left-indent { background-position: -1666px -34px }
128
+.icon-g-right-indent { background-position: -1700px -34px }
129
+.icon-g-align-left { background-position: -1734px -34px }
130
+.icon-g-align-center { background-position: -1768px -34px }
131
+.icon-g-align-right { background-position: -1802px -34px }
132
+.icon-g-justify { background-position: -1836px -34px }
133
+.icon-g-list { background-position: -1870px -34px }
134
+.icon-g-text-smaller { background-position: -1904px -34px }
135
+.icon-g-text-bigger { background-position: -1938px -34px }
136
+.icon-g-embed { background-position: -1972px -34px }
137
+.icon-g-embed-close { background-position: 0 -68px }
138
+.icon-g-adjust { background-position: -34px -68px }
139
+.icon-g-message-full { background-position: -68px -68px }
140
+.icon-g-message-empty { background-position: -102px -68px }
141
+.icon-g-message-in { background-position: -136px -68px }
142
+.icon-g-message-out { background-position: -170px -68px }
143
+.icon-g-message-plus { background-position: -204px -68px }
144
+.icon-g-message-minus { background-position: -238px -68px }
145
+.icon-g-message-ban { background-position: -272px -68px }
146
+.icon-g-message-flag { background-position: -306px -68px }
147
+.icon-g-message-lock { background-position: -340px -68px }
148
+.icon-g-message-new { background-position: -374px -68px }
149
+.icon-g-inbox { background-position: -408px -68px }
150
+.icon-g-inbox-plus { background-position: -442px -68px }
151
+.icon-g-inbox-minus { background-position: -476px -68px }
152
+.icon-g-inbox-lock { background-position: -510px -68px }
153
+.icon-g-inbox-in { background-position: -544px -68px }
154
+.icon-g-inbox-out { background-position: -578px -68px }
155
+.icon-g-computer-locked { background-position: -612px -68px }
156
+.icon-g-computer-service { background-position: -646px -68px }
157
+.icon-g-computer-proces { background-position: -680px -68px }
158
+.icon-g-phone { background-position: -714px -68px }
159
+.icon-g-database-lock { background-position: -748px -68px }
160
+.icon-g-database-plus { background-position: -782px -68px }
161
+.icon-g-database-minus { background-position: -816px -68px }
162
+.icon-g-database-ban { background-position: -850px -68px }
163
+.icon-g-folder-open { background-position: -884px -68px }
164
+.icon-g-folder-plus { background-position: -918px -68px }
165
+.icon-g-folder-minus { background-position: -952px -68px }
166
+.icon-g-folder-lock { background-position: -986px -68px }
167
+.icon-g-folder-flag { background-position: -1020px -68px }
168
+.icon-g-folder-new { background-position: -1054px -68px }
169
+.icon-g-check { background-position: -1088px -68px }
170
+.icon-g-edit { background-position: -1122px -68px }
171
+.icon-g-new-window { background-position: -1156px -68px }
172
+.icon-g-more-windows { background-position: -1190px -68px }
173
+.icon-g-show-big-thumbnails { background-position: -1224px -68px }
174
+.icon-g-show-thumbnails { background-position: -1258px -68px }
175
+.icon-g-show-thumbnails-with-lines { background-position: -1292px -68px }
176
+.icon-g-show-lines { background-position: -1326px -68px }
177
+.icon-g-playlist { background-position: -1360px -68px }
178
+.icon-g-picture { background-position: -1394px -68px }
179
+.icon-g-imac { background-position: -1428px -68px }
180
+.icon-g-macbook { background-position: -1462px -68px }
181
+.icon-g-ipad { background-position: -1496px -68px }
182
+.icon-g-iphone { background-position: -1530px -68px }
183
+.icon-g-iphone-transfer { background-position: -1564px -68px }
184
+.icon-g-iphone-exchange { background-position: -1598px -68px }
185
+.icon-g-ipod { background-position: -1632px -68px }
186
+.icon-g-ipod-shuffle { background-position: -1666px -68px }
187
+.icon-g-ear-plugs { background-position: -1700px -68px }
188
+.icon-g-albums { background-position: -1734px -68px }
189
+.icon-g-step-backward { background-position: -1768px -68px }
190
+.icon-g-fast-backward { background-position: -1802px -68px }
191
+.icon-g-rewind { background-position: -1836px -68px }
192
+.icon-g-play { background-position: -1870px -68px }
193
+.icon-g-pause { background-position: -1904px -68px }
194
+.icon-g-stop { background-position: -1938px -68px }
195
+.icon-g-forward { background-position: -1972px -68px }
196
+.icon-g-fast-forward { background-position: 0 -102px }
197
+.icon-g-step-forward { background-position: -34px -102px }
198
+.icon-g-eject { background-position: -68px -102px }
199
+.icon-g-facetime-video { background-position: -102px -102px }
200
+.icon-g-download-alt { background-position: -136px -102px }
201
+.icon-g-mute { background-position: -170px -102px }
202
+.icon-g-volume-down { background-position: -204px -102px }
203
+.icon-g-volume-up { background-position: -238px -102px }
204
+.icon-g-screenshot { background-position: -272px -102px }
205
+.icon-g-move { background-position: -306px -102px }
206
+.icon-g-more { background-position: -340px -102px }
207
+.icon-g-brightness-reduce { background-position: -374px -102px }
208
+.icon-g-brightness-increase { background-position: -408px -102px }
209
+.icon-g-circle-plus { background-position: -442px -102px }
210
+.icon-g-circle-minus { background-position: -476px -102px }
211
+.icon-g-circle-remove { background-position: -510px -102px }
212
+.icon-g-circle-ok { background-position: -544px -102px }
213
+.icon-g-circle-question-mark { background-position: -578px -102px }
214
+.icon-g-circle-info { background-position: -612px -102px }
215
+.icon-g-circle-exclamation-mark { background-position: -646px -102px }
216
+.icon-g-remove { background-position: -680px -102px }
217
+.icon-g-ok { background-position: -714px -102px }
218
+.icon-g-ban { background-position: -748px -102px }
219
+.icon-g-download { background-position: -782px -102px }
220
+.icon-g-upload { background-position: -816px -102px }
221
+.icon-g-shopping-cart { background-position: -850px -102px }
222
+.icon-g-lock { background-position: -884px -102px }
223
+.icon-g-unlock { background-position: -918px -102px }
224
+.icon-g-electricity { background-position: -952px -102px }
225
+.icon-g-ok-2 { background-position: -986px -102px }
226
+.icon-g-remove-2 { background-position: -1020px -102px }
227
+.icon-g-cart-out { background-position: -1054px -102px }
228
+.icon-g-cart-in { background-position: -1088px -102px }
229
+.icon-g-left-arrow { background-position: -1122px -102px }
230
+.icon-g-right-arrow { background-position: -1156px -102px }
231
+.icon-g-down-arrow { background-position: -1190px -102px }
232
+.icon-g-up-arrow { background-position: -1224px -102px }
233
+.icon-g-resize-small { background-position: -1258px -102px }
234
+.icon-g-resize-full { background-position: -1292px -102px }
235
+.icon-g-circle-arrow-left { background-position: -1326px -102px }
236
+.icon-g-circle-arrow-right { background-position: -1360px -102px }
237
+.icon-g-circle-arrow-top { background-position: -1394px -102px }
238
+.icon-g-circle-arrow-down { background-position: -1428px -102px }
239
+.icon-g-play-button { background-position: -1462px -102px }
240
+.icon-g-unshare { background-position: -1496px -102px }
241
+.icon-g-share { background-position: -1530px -102px }
242
+.icon-g-thin-right-arrow { background-position: -1564px -102px }
243
+.icon-g-thin-arrow-left { background-position: -1598px -102px }
244
+.icon-g-bluetooth { background-position: -1632px -102px }
245
+.icon-g-euro { background-position: -1666px -102px }
246
+.icon-g-usd { background-position: -1700px -102px }
247
+.icon-g-bp { background-position: -1734px -102px }
248
+.icon-g-retweet-2 { background-position: -1768px -102px }
249
+.icon-g-moon { background-position: -1802px -102px }
250
+.icon-g-sun { background-position: -1836px -102px }
251
+.icon-g-cloud { background-position: -1870px -102px }
252
+.icon-g-direction { background-position: -1904px -102px }
253
+.icon-g-brush { background-position: -1938px -102px }
254
+.icon-g-pen { background-position: -1972px -102px }
255
+.icon-g-zoom-in { background-position: 0 -136px }
256
+.icon-g-zoom-out { background-position: -34px -136px }
257
+.icon-g-pin { background-position: -68px -136px }
258
+.icon-g-riflescope { background-position: -102px -136px }
259
+.icon-g-rotation-lock { background-position: -136px -136px }
260
+.icon-g-flash { background-position: -170px -136px }
261
+.icon-g-google-maps { background-position: -204px -136px }
262
+.icon-g-anchor { background-position: -238px -136px }
263
+.icon-g-conversation { background-position: -272px -136px }
264
+.icon-g-chat { background-position: -306px -136px }
265
+.icon-g-male { background-position: -340px -136px }
266
+.icon-g-female { background-position: -374px -136px }
267
+.icon-g-asterisk { background-position: -408px -136px }
268
+.icon-g-divide { background-position: -442px -136px }
269
+.icon-g-snorkel-diving { background-position: -476px -136px }
270
+.icon-g-scuba-diving { background-position: -510px -136px }
271
+.icon-g-oxygen-bottle { background-position: -544px -136px }
272
+.icon-g-fins { background-position: -578px -136px }
273
+.icon-g-fishes { background-position: -612px -136px }
274
+.icon-g-boat { background-position: -646px -136px }
275
+.icon-g-delete-point { background-position: -680px -136px }
276
+.icon-g-sheriffs--star { background-position: -714px -136px }
277
+.icon-g-qrcode { background-position: -748px -136px }
278
+.icon-g-barcode { background-position: -782px -136px }
279
+.icon-g-pool { background-position: -816px -136px }
280
+.icon-g-buoy { background-position: -850px -136px }
281
+.icon-g-spade { background-position: -884px -136px }
282
+.icon-g-bank { background-position: -918px -136px }
283
+.icon-g-vcard { background-position: -952px -136px }
284
+.icon-g-electrical-plug { background-position: -986px -136px }
285
+.icon-g-flag { background-position: -1020px -136px }
286
+.icon-g-credit-card { background-position: -1054px -136px }
287
+.icon-g-keyboard-wireless { background-position: -1088px -136px }
288
+.icon-g-keyboard-wired { background-position: -1122px -136px }
289
+.icon-g-shield { background-position: -1156px -136px }
290
+.icon-g-ring { background-position: -1190px -136px }
291
+.icon-g-cake { background-position: -1224px -136px }
292
+.icon-g-drink { background-position: -1258px -136px }
293
+.icon-g-beer { background-position: -1292px -136px }
294
+.icon-g-fast-food { background-position: -1326px -136px }
295
+.icon-g-cutlery { background-position: -1360px -136px }
296
+.icon-g-pizza { background-position: -1394px -136px }
297
+.icon-g-birthday-cake { background-position: -1428px -136px }
298
+.icon-g-tablet { background-position: -1462px -136px }
299
+.icon-g-settings { background-position: -1496px -136px }
300
+.icon-g-bullets { background-position: -1530px -136px }
301
+.icon-g-cardio { background-position: -1564px -136px }
302
+.icon-g-t-shirt { background-position: -1598px -136px }
303
+.icon-g-pants { background-position: -1632px -136px }
304
+.icon-g-sweater { background-position: -1666px -136px }
305
+.icon-g-fabric { background-position: -1700px -136px }
306
+.icon-g-leather { background-position: -1734px -136px }
307
+.icon-g-scissors { background-position: -1768px -136px }
308
+.icon-g-podium { background-position: -1802px -136px }
309
+.icon-g-skull { background-position: -1836px -136px }
310
+.icon-g-celebration { background-position: -1870px -136px }
311
+.icon-g-tea-kettle { background-position: -1904px -136px }
312
+.icon-g-french-press { background-position: -1938px -136px }
313
+.icon-g-coffe-cup { background-position: -1972px -136px }
314
+.icon-g-pot { background-position: 0 -170px }
315
+.icon-g-grater { background-position: -34px -170px }
316
+.icon-g-kettle { background-position: -68px -170px }
317
+.icon-g-hospital { background-position: -102px -170px }
318
+.icon-g-hospital-h { background-position: -136px -170px }
319
+.icon-g-microphone { background-position: -170px -170px }
320
+.icon-g-webcam { background-position: -204px -170px }
321
+.icon-g-temple-christianity-church { background-position: -238px -170px }
322
+.icon-g-temple-islam { background-position: -272px -170px }
323
+.icon-g-temple-hindu { background-position: -306px -170px }
324
+.icon-g-temple-buddhist { background-position: -340px -170px }
325
+.icon-g-electrical-socket-eu { background-position: -374px -170px }
326
+.icon-g-electrical-socket-us { background-position: -408px -170px }
327
+.icon-g-bomb { background-position: -442px -170px }
328
+.icon-g-comments { background-position: -476px -170px }
329
+.icon-g-flower { background-position: -510px -170px }
330
+.icon-g-baseball { background-position: -544px -170px }
331
+.icon-g-rugby { background-position: -578px -170px }
332
+.icon-g-ax { background-position: -612px -170px }
333
+.icon-g-table-tennis { background-position: -646px -170px }
334
+.icon-g-bowling { background-position: -680px -170px }
335
+.icon-g-tree-conifer { background-position: -714px -170px }
336
+.icon-g-tree-deciduous { background-position: -748px -170px }
337
+.icon-g-more-items { background-position: -782px -170px }
338
+.icon-g-sort { background-position: -816px -170px }
339
+.icon-g-filter { background-position: -850px -170px }
340
+.icon-g-gamepad { background-position: -884px -170px }
341
+.icon-g-playing-dices { background-position: -918px -170px }
342
+.icon-g-calculator { background-position: -952px -170px }
343
+.icon-g-tie { background-position: -986px -170px }
344
+.icon-g-wallet { background-position: -1020px -170px }
345
+.icon-g-share { background-position: -1054px -170px }
346
+.icon-g-sampler { background-position: -1088px -170px }
347
+.icon-g-piano { background-position: -1122px -170px }
348
+.icon-g-web-browser { background-position: -1156px -170px }
349
+.icon-g-blog { background-position: -1190px -170px }
350
+.icon-g-dashboard { background-position: -1224px -170px }
351
+.icon-g-certificate { background-position: -1258px -170px }
352
+.icon-g-bell { background-position: -1292px -170px }
353
+.icon-g-candle { background-position: -1326px -170px }
354
+.icon-g-pin-classic { background-position: -1360px -170px }
355
+.icon-g-iphone-shake { background-position: -1394px -170px }
356
+.icon-g-pin-flag { background-position: -1428px -170px }
357
+.icon-g-turtle { background-position: -1462px -170px }
358
+.icon-g-rabbit { background-position: -1496px -170px }
359
+.icon-g-globe { background-position: -1530px -170px }
360
+.icon-g-briefcase { background-position: -1564px -170px }
361
+.icon-g-hdd { background-position: -1598px -170px }
362
+.icon-g-thumbs-up { background-position: -1632px -170px }
363
+.icon-g-thumbs-down { background-position: -1666px -170px }
364
+.icon-g-hand-right { background-position: -1700px -170px }
365
+.icon-g-hand-left { background-position: -1734px -170px }
366
+.icon-g-hand-up { background-position: -1768px -170px }
367
+.icon-g-hand-down { background-position: -1802px -170px }
368
+.icon-g-fullscreen { background-position: -1836px -170px }
369
+.icon-g-shopping-bag { background-position: -1870px -170px }
370
+.icon-g-book-open { background-position: -1904px -170px }
371
+.icon-g-nameplate { background-position: -1938px -170px }
372
+.icon-g-nameplate-alt { background-position: -1972px -170px }
373
+.icon-g-vases { background-position: 0 -204px }
374
+.icon-g-announcement { background-position: -34px -204px }
375
+.icon-g-dumbbell { background-position: -68px -204px }
376
+.icon-g-suitcase { background-position: -102px -204px }
377
+.icon-g-file-import { background-position: -136px -204px }
378
+.icon-g-file-export { background-position: -170px -204px }
379
+.icon-g-pinterest { background-position: -204px -204px }
380
+.icon-g-dropbox { background-position: -238px -204px }
381
+.icon-g-google-alt { background-position: -272px -204px }
382
+.icon-g-jolicloud { background-position: -306px -204px }
383
+.icon-g-yahoo { background-position: -340px -204px }
384
+.icon-g-blogger { background-position: -374px -204px }
385
+.icon-g-picasa { background-position: -408px -204px }
386
+.icon-g-amazon { background-position: -442px -204px }
387
+.icon-g-tumblr { background-position: -476px -204px }
388
+.icon-g-wordpress { background-position: -510px -204px }
389
+.icon-g-instapaper { background-position: -544px -204px }
390
+.icon-g-evernote { background-position: -578px -204px }
391
+.icon-g-xing { background-position: -612px -204px }
392
+.icon-g-zootool { background-position: -646px -204px }
393
+.icon-g-dribbble { background-position: -680px -204px }
394
+.icon-g-deviantart { background-position: -714px -204px }
395
+.icon-g-read-it-later { background-position: -748px -204px }
396
+.icon-g-linked-in { background-position: -782px -204px }
397
+.icon-g-forrst { background-position: -816px -204px }
398
+.icon-g-pinboard { background-position: -850px -204px }
399
+.icon-g-behance { background-position: -884px -204px }
400
+.icon-g-github { background-position: -918px -204px }
401
+.icon-g-youtube { background-position: -952px -204px }
402
+.icon-g-skitch { background-position: -986px -204px }
403
+.icon-g-4square { background-position: -1020px -204px }
404
+.icon-g-quora { background-position: -1054px -204px }
405
+.icon-g-google-plus { background-position: -1088px -204px }
406
+.icon-g-spootify { background-position: -1122px -204px }
407
+.icon-g-stumbleupon { background-position: -1156px -204px }
408
+.icon-g-readability { background-position: -1190px -204px }
409
+.icon-g-facebook { background-position: -1224px -204px }
410
+.icon-g-twitter-t { background-position: -1258px -204px }
411
+.icon-g-twitter { background-position: -1292px -204px }
412
+.icon-g-buzz { background-position: -1326px -204px }
413
+.icon-g-vimeo { background-position: -1360px -204px }
414
+.icon-g-flickr { background-position: -1394px -204px }
415
+.icon-g-last-fm { background-position: -1428px -204px }
416
+.icon-g-rss { background-position: -1462px -204px }
417
+.icon-g-skype { background-position: -1496px -204px }
418
+.icon-g-e-mail { background-position: -1530px -204px }

+ 42 - 0
pboard/pboard/public/css/style.css View File

@@ -0,0 +1,42 @@
1
+/* TurboGears flash bootstrap look */
2
+#flash > div {
3
+  padding: 8px 35px 8px 14px;
4
+  margin-bottom: 20px;
5
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
6
+  background-color: #fcf8e3;
7
+  border: 1px solid #fbeed5;
8
+  -webkit-border-radius: 4px;
9
+     -moz-border-radius: 4px;
10
+          border-radius: 4px;
11
+  color: #c09853;
12
+}
13
+
14
+#flash > .ok {
15
+  color: #468847;
16
+  background-color: #dff0d8;
17
+  border-color: #d6e9c6;
18
+}
19
+
20
+#flash > .error {
21
+  color: #b94a48;
22
+  background-color: #f2dede;
23
+  border-color: #eed3d7;
24
+}
25
+
26
+#flash > .info {
27
+  color: #3a87ad;
28
+  background-color: #d9edf7;
29
+  border-color: #bce8f1;
30
+}
31
+
32
+/* Footer styling */
33
+.footer {
34
+    margin-top: 45px;
35
+    padding: 35px 0 36px;
36
+    border-top: 1px solid #e5e5e5;
37
+}
38
+
39
+.footer p {
40
+    margin-bottom: 0;
41
+    color: #555;
42
+}

BIN
pboard/pboard/public/favicon.ico View File


BIN
pboard/pboard/public/img/glyphicons-grey.png View File


BIN
pboard/pboard/public/img/glyphicons-halflings-white.original.png View File


BIN
pboard/pboard/public/img/glyphicons-halflings.original.png View File


BIN
pboard/pboard/public/img/glyphicons-white.png View File


BIN
pboard/pboard/public/img/glyphicons.png View File


BIN
pboard/pboard/public/img/turbogears_logo.png View File


BIN
pboard/pboard/public/img/turbogears_logo_big.png View File


BIN
pboard/pboard/public/img/under_the_hood_blue.png View File


File diff suppressed because it is too large
+ 6 - 0
pboard/pboard/public/javascript/bootstrap.min.js


+ 0 - 0
pboard/pboard/templates/__init__.py View File


+ 190 - 0
pboard/pboard/templates/about.mak View File

@@ -0,0 +1,190 @@
1
+<%inherit file="local:templates.master"/>
2
+
3
+<%def name="title()">
4
+Learning TurboGears 2.3: Quick guide to the Quickstart pages.
5
+</%def>
6
+
7
+   <div class="row">
8
+      <div class="span12">
9
+        <div class="page-header">
10
+          <h2>Architectural basics of a quickstart TG2 site.</h2>
11
+        </div>
12
+
13
+        <p>The TG2 quickstart command produces this basic TG site. Here's how it works.</p>
14
+      </div>
15
+
16
+      <div class="span4">
17
+        <div class="well" style="padding: 8px 0;">
18
+          <ul class="nav nav-list">
19
+            <li class="nav-header">About Architecture</li>
20
+            <li><a href="#data-model">Data Model</a></li>
21
+            <li><a href="#url-structure">URL Structure</a></li>
22
+            <li><a href="#template-reuse">Web page element's reuse</a></li>
23
+            <li py:if="tg.auth_stack_enabled" class="nav-header">Authentication</li>
24
+            <li py:if="tg.auth_stack_enabled"><a href="#authentication">Authorization and Authentication</a></li>
25
+          </ul>
26
+        </div>
27
+
28
+        <div class="well" id="data-model">
29
+          <h3>Code my data model</h3>
30
+
31
+          <p>When you want a model for storing favorite links or wiki content, the
32
+          <code>/model</code> folder in your site is ready to go.</p>
33
+
34
+          <p>You can build a dynamic site without any data model at all. There still be a
35
+          default data-model template for you if you didn't enable authentication and
36
+          authorization in quickstart. If you have enabled authorization, the auth
37
+          data-model is ready-made.</p>
38
+        </div>
39
+
40
+        <div class="well" id="url-structure">
41
+          <h3>Design my URL structure</h3>
42
+
43
+          <p>The "<code>root.py</code>" file under the <code>/controllers</code> folder has
44
+          your URLs. When you called this url (<code><a href=
45
+          "${tg.url('/about')}">about</a></code>), the command went through the
46
+          RootController class to the <code>about()</code> method.</p>
47
+
48
+          <p>Those Python methods are responsible to create the dictionary of variables
49
+          that will be used in your web views (template).</p>
50
+        </div>
51
+      </div>
52
+
53
+      <div class="span8"><img src=
54
+      "http://www.turbogears.org/2.1/docs/_images/tg2_files.jpg" alt=
55
+      "TurboGears2 quickstarted project" /></div>
56
+    </div>
57
+
58
+    <div class="row">
59
+      <div class="span12" id="template-reuse">
60
+        <h3>Reuse the web page elements</h3>
61
+
62
+        <p>A web page viewed by user could be constructed by single or several reusable
63
+        templates under <code>/templates</code>. Take 'about' page for example, each
64
+        reusable templates generating a part of the page. We'll cover them in the order of
65
+        where they are found, listed near the top of the about.html template</p>
66
+
67
+        <div class="row">
68
+          <div class="span6">
69
+            <p><strong><span class="label label-info">header.html</span></strong> - The
70
+            "header.html" template contains the HTML code to display the 'header': The div,
71
+            the h1 tag, and the subtitle are there, and the the blue gradient, TG2 logo,
72
+            are placed by way of the .css file (from style.css) are all at the top of every
73
+            page it is included on. When the "about.html" template is called, it includes
74
+            this "header.html" template (and the others) with a <code>&lt;xi:include
75
+            /&gt;</code> tag, part of the Genshi templating system. The "header.html"
76
+            template is not a completely static HTML -- it also includes (via
77
+            <code>&lt;xi:include/&gt;</code> tag) "master.html", which dynamically displays
78
+            the current page name with a Genshi template method called "replace" with the
79
+            code: <code>&lt;span py:replace="page"/&gt;</code>. It means replace this
80
+            <code>&lt;span /&gt;</code> region with the contents found in the variable
81
+            'page' that has been sent in the dictionary to this "about.html" template, and
82
+            is available through that namespace for use by this "header.html" template.
83
+            That's how it changes in the header depending on what page you are
84
+            visiting.</p>
85
+
86
+            <p><strong><span class="label label-info">sidebars.html</span></strong> - The
87
+            sidebars (navigation areas on the right side of the page) are generated as two
88
+            separate <code>py:def</code> blocks in the "sidebars.html" template. The
89
+            <code>py:def</code> construct is best thought of as a "macro" code... a simple
90
+            way to separate and reuse common code snippets. All it takes to include these
91
+            on the "about.html" page template is to write</p>
92
+            <pre><span>$</span>{sidebar_top()}
93
+<span>$</span>{sidebar_bottom()}
94
+  </pre>in the page where they are wanted. CSS styling (in "/public/css/style.css") floats
95
+  them off to the right side. You can remove a sidebar or add more of them, and the CSS
96
+  will place them one atop the other.
97
+
98
+            <p>This is, of course, also exactly how the header and footer templates are
99
+            also displayed in their proper places, but we'll cover that in the
100
+            "master.html" template below.</p>
101
+
102
+            <p>Oh, and in sidebar_top we've added a dynamic menu that shows the link to
103
+            this page at the top when you're at the "index" page, and shows a link to the
104
+            Home (index) page when you're here. Study the "sidebars.html" template to see
105
+            how we used <code>py:choose</code> for that.</p>
106
+          </div>
107
+
108
+          <div class="span6">
109
+            <p><strong><span class="label label-info">footer.html</span></strong> - The
110
+            "footer.html" block is simple, but also utilizes a special "replace" method to
111
+            set the current YEAR in the footer copyright message. The code is:</p>
112
+            <pre>
113
+  &lt;span py:replace="now.strftime('%Y')"&gt;
114
+  </pre>and it uses the variable "now" that was passed in with the dictionary of variables.
115
+  But because "now" is a datetime object, we can use the Python <code>"strftime()"</code>
116
+  method with the "replace" call to say "Just Display The Year Here". Simple, elegant; we
117
+  format the date display in the template (the View in the Model/View/Controller
118
+  architecture) rather than formatting it in the Controller method and sending it to the
119
+  template as a string variable.
120
+
121
+            <p><strong><span class="label label-info">master.html</span></strong> - The
122
+            "master.html" template is called last, by design. The "master.html" template
123
+            controls the overall design of the page we're looking at, calling first the
124
+            "header" py:def macro, then the putting everything from this "about.html"
125
+            template into the "main_content" div, and then calling the "footer" macro at
126
+            the end. Thus the "master.html" template provides the overall architecture for
127
+            each page in this site.</p>
128
+
129
+            <p>But why then shouldn't we call it first? Isn't it the most important?
130
+            Perhaps, but that's precisely why we call it LAST. The "master.html" template
131
+            needs to know where to find everything else, everything that it will use in
132
+            py:def macros to build the page. So that means we call the other templates
133
+            first, and then call "master.html".</p>
134
+
135
+            <p>There's more to the "master.html" template... study it to see how the
136
+            &lt;title&gt; tags and static JS and CSS files are brought into the page.
137
+            Templating with Genshi is a powerful tool and we've only scratched the surface.
138
+            There are also a few little CSS tricks hidden in these pages, like the use of a
139
+            "clearingdiv" to make sure that your footer stays below the sidebars and always
140
+            looks right. That's not TG2 at work, just CSS. You'll need all your skills to
141
+            build a fine web app, but TG2 will make the hard parts easier so that you can
142
+            concentrate more on good design and content rather than struggling with
143
+            mechanics.</p>
144
+          </div>
145
+
146
+          <div class="span12" id="authentication" py:if="tg.auth_stack_enabled">
147
+            <h3>Authentication &amp; Authorization in a TG2 site.</h3>
148
+
149
+            <p>If you have access to this page, this means you have enabled authentication
150
+            and authorization in the quickstart to create your project.</p>
151
+
152
+            <p>The paster command will have created a few specific controllers for you. But
153
+            before you go to play with those controllers you'll need to make sure your
154
+            application has been properly bootstapped. This is dead easy, here is how to do
155
+            this:</p>
156
+            <pre>paster setup-app development.ini</pre>
157
+
158
+            <p>inside your application's folder and you'll get a database setup (using the
159
+            preferences you have set in your development.ini file). This database will also
160
+            have been prepopulated with some default logins/passwords so that you can test
161
+            the secured controllers and methods.</p>
162
+
163
+            <p>To change the comportement of this setup-app command you just need to edit
164
+            the <code>websetup.py</code> file.</p>
165
+
166
+            <p>Now try to visiting the <a href=
167
+            "${tg.url('/manage_permission_only')}">manage_permission_only</a> URL. You will
168
+            be challenged with a login/password form.</p>
169
+
170
+            <p>Only managers are authorized to visit this method. You will need to log-in
171
+            using:</p>
172
+            <pre>login: manager
173
+password: managepass</pre>
174
+
175
+            <p>Another protected resource is <a href=
176
+            "${tg.url('/editor_user_only')}">editor_user_only</a>. This one is protected by
177
+            a different set of permissions. You will need to be <code>editor</code> with a
178
+            password of <code>editpass</code> to be able to access it.</p>
179
+
180
+            <p>The last kind of protected resource in this quickstarted app is a full so
181
+            called <a href="${tg.url('/secc')}">secure controller</a>. This controller is
182
+            protected globally. Instead of having a @require decorator on each method, we
183
+            have set an allow_only attribute at the class level. All the methods in this
184
+            controller will require the same level of access. You need to be manager to
185
+            access <a href="${tg.url('/secc')}">secc</a> or <a href=
186
+            "${tg.url('/secc/some_where')}">secc/some_where</a>.</p>
187
+          </div>
188
+        </div>
189
+      </div>
190
+    </div>

+ 204 - 0
pboard/pboard/templates/dashboard.mak View File

@@ -0,0 +1,204 @@
1
+<%inherit file="local:templates.master"/>
2
+<%def name="get_icon_class_from_node_type(node_type)">
3
+
4
+</%def>
5
+
6
+<%def name="node_treeview(node_list, indentation=0)">
7
+  % if len(node_list)>0:
8
+    <!--ul style="list-style:none; margin-left: ${(indentation+1)*0.5}em;"-->
9
+    % for node in node_list:
10
+      <tr title="Last updated: ${node.updated_at}">
11
+        <td style="padding-left: ${(indentation+1)*0.5}em;">
12
+          <a href="?node=${node.node_id}" title="${node.data_label}">
13
+            <i class='${node.getIconClass()}'></i>
14
+            % if len(node.data_label)<=15:
15
+              ${node.data_label}
16
+            % else:
17
+              ${node.data_label[0:15]}...
18
+            % endif
19
+          </a>
20
+        </td>
21
+        <td class="text-right">
22
+          <a href="${tg.url('/move_node_upper?node_id=%i'%(node.node_id))}" title="Move up"><i class=" icon-g-up-arrow"></i></a>
23
+          <a href="${tg.url('/move_node_lower?node_id=%i'%(node.node_id))}" title="Move down"><i class=" icon-g-down-arrow"></i></a>
24
+          <a href="" title="Edit"><i class="icon-g-edit"></i></a>
25
+        </td>
26
+      </tr>
27
+      ${node_treeview(node.getChildren(), indentation+1)}
28
+    % endfor
29
+    <!--/ul-->
30
+  % endif
31
+</%def>
32
+
33
+<%def name="node_treeview_in_select_field(node_list, indentation)">
34
+    % if len(node_list)>0:
35
+      % if indentation==0:
36
+        <option style="margin-left: ${0.5*indentation}em; color: #CCC;" value="0">no parent...</option>
37
+      % endif
38
+      % for node in node_list:
39
+        <option style="margin-left: ${0.5*indentation}em;" value="${node.node_id}">${node.data_label}</option>
40
+        ${node_treeview_in_select_field(node.getChildren(), indentation+1)}
41
+      % endfor
42
+      </ul>
43
+    % endif
44
+</%def>
45
+
46
+<%def name="title()">
47
+Learning TurboGears 2.3: Quick guide to the Quickstart pages.
48
+</%def>
49
+
50
+  <div class="row">
51
+    <div class="span3">
52
+      <legend>
53
+        Documents
54
+      </legend>
55
+
56
+      <!-- Button to trigger modal -->
57
+      <p>
58
+        <a href="#addFolderNode" role="button" class="btn" data-toggle="modal">
59
+          <i class="icon-g-circle-plus"></i> Create document</a>
60
+      </p>
61
+      <!-- Modal -->
62
+      <div id="addFolderNode" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
63
+        <div class="modal-header">
64
+          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
65
+          <h3 id="myModalLabel">Create a new page</h3>
66
+        </div>
67
+        <div class="modal-body">
68
+          <form id="create_document_form" method="POST" action="${tg.url('/create_document')}" class="form-horizontal">
69
+            <div class="control-group">
70
+              <label class="control-label" for="data_label">Title</label>
71
+              <div class="controls">
72
+                <input type="text" id="data_label" name="data_label" placeholder="page title...">
73
+              </div>
74
+            </div>
75
+            <div class="control-group">
76
+              <label class="control-label" for="parent_id">As child of...</label>
77
+              <div class="controls">
78
+                <select id="parent_id" name="parent_id" placeholder="as child of...">
79
+                  ${node_treeview_in_select_field(root_node_list, 0)}
80
+                </select>
81
+              </div>
82
+            </div>
83
+            <div class="control-group">
84
+              <label class="control-label" for="data_content">Description</label>
85
+              <div class="controls">
86
+
87
+                <textarea id="data_content" name="data_content"></textarea>
88
+              </div>
89
+            </div>
90
+          </form>
91
+        </div>
92
+        <div class="modal-footer">
93
+          <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
94
+          <button id="create_document_save_button" class="btn btn-primary">Save changes</button>
95
+        </div>
96
+      </div>
97
+
98
+      <div>
99
+        <table class="table table-striped table-hover table-condensed">
100
+          ${node_treeview(root_node_list)}
101
+        </table>
102
+      </div>
103
+    </div>
104
+    <div class="span5">
105
+      <div class="page-header">
106
+        <h3>${current_node.data_label}</h3>
107
+      </div>
108
+
109
+      <div class="btn-group">
110
+        <button class="btn"><i class="icon-g-edit"></i> Edit</button>
111
+
112
+      </div>
113
+
114
+      <div class="btn-group">
115
+        <a class="btn btn-primary" href="#"><i class="icon-g-stats icon-g-white"></i> Status</a>
116
+        <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
117
+        <ul class="dropdown-menu">
118
+        
119
+          
120
+  
121
+          <li><a class="btn-success" href="#"><i class="icon-g-sun"></i> Open</a></li>
122
+          <li><a class="btn-warning" href="#"><i class="icon-g-rotation-lock"></i> in Standby</a></li>
123
+          <li><a class="btn-danger"  href="#"><i class="icon-g-circle-exclamation-mark"></i> Hot</a></li>
124
+          <li><a class="btn " href="#"><i class="icon-g-ok"></i> Finished</a></li>
125
+          <li><a class="btn btn-disabled" href="#"><i class="icon-g-ban"></i> Archived</a></li>
126
+        </ul>
127
+
128
+      </div>
129
+
130
+      <div class="btn-group">
131
+        <a class="btn btn-primary" href="#" ><i class="icon-g-circle-plus icon-g-white"></i> Add</a>
132
+        <a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
133
+        <ul class="dropdown-menu">
134
+          <li><a href="#"><i class="icon-g-calendar" ></i> Event</a></li>
135
+          <li><a href="#"><i class="icon-g-comments"></i> Comment</a></li>
136
+          <li><a href="#"><i class="icon-g-user"></i> Contact</a></li>
137
+          <li><a href="#"><i class="icon-g-attach"></i> File</a></li>
138
+        </ul>
139
+      </div>
140
+
141
+      <div class="btn-group">
142
+        <button class="btn btn-danger"><i class="icon-g-white icon-g-remove"></i> Delete</button>
143
+      </div>
144
+      
145
+    
146
+      <div>
147
+        ${current_node.data_content|n}
148
+      </div>
149
+    </div>
150
+    <div class="span4">
151
+      <div class="tabbable">
152
+        <ul class="nav nav-tabs">
153
+            <li class="active">
154
+              <a href="#events" data-toggle="tab" title="History"><i class="icon-g-calendar"></i></a>
155
+            </li>
156
+            <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i> </a></li>
157
+            <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-comments"></i> </a></li>
158
+            <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i> </a></li>
159
+        </ul>
160
+        <div class="tab-content">
161
+            <div class="tab-pane active" id="events">
162
+              <!--p class="text-right" >
163
+                <button class="text-right btn btn-info " type="button"><i class="icon-g-plus icon-g-white"></i> new event</button>
164
+              </p-->
165
+              <table class="table table-striped table-hover table-condensed">
166
+                <thead>
167
+                  <tr>
168
+                    <th>Date</th>
169
+                    <th>Time</th>
170
+                    <th>
171
+                      Event
172
+                    </th>
173
+                    <th>
174
+                      <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
175
+                    </th>
176
+                  </tr>
177
+                </thead>
178
+              % for event in current_node.getEvents():
179
+                <tr title="Last updated: ${event.updated_at}">
180
+                   <td>${event.getFormattedDate(event.data_datetime)}</td>
181
+                   <td>${event.getFormattedTime(event.data_datetime)}</td>
182
+                   <td>${event.data_label}</td>
183
+                   <td>
184
+                     <a href=""><i class="icon-g-edit"></i></a>
185
+                   </td>
186
+                </tr>
187
+              % endfor
188
+              </table>
189
+            </div>
190
+            <div class="tab-pane" id="contacts">
191
+              % for contact in current_node.getContacts():
192
+                <div class="well">
193
+                  <legend class="text-info">${contact.data_label}</legend>
194
+                  <div>${contact.data_content|n}</div>
195
+                </div>
196
+              % endfor
197
+            </div>
198
+            <div class="tab-pane" id="comments">${current_node.data_content|n}</div>
199
+            <div class="tab-pane" id="files">Files</div>
200
+        </div>
201
+      </div>
202
+    </div>
203
+  </div>
204
+

+ 27 - 0
pboard/pboard/templates/data.mak View File

@@ -0,0 +1,27 @@
1
+<%inherit file="local:templates.master"/>
2
+
3
+<%def name="title()">
4
+  Welcome to TurboGears 2.3, standing on the shoulders of giants, since 2007
5
+</%def>
6
+
7
+<h2>Content Type Dispatch</h2>
8
+<p>
9
+This page shows how you can provide multiple pages
10
+directly from the same controller method.  This page is generated 
11
+from the expose decorator with the template defintion provided.
12
+You can provide a url with parameters and this page will display
13
+the parameters as html, and the json version will express
14
+the entries as JSON.  Here, try it out: <a href="/data.html?a=1&b=2">/data.html?a=1&b=2</a>
15
+</p>
16
+
17
+<p>Click here for the <a href="${tg.url('/data.json', params=params)}">JSON Version of this page.</a></p>
18
+<p>The data provided in the template call is: 
19
+    <table>
20
+        %for key, value in params.items():
21
+            <tr>
22
+                <td>${key}</td>
23
+                <td>${value}</td>
24
+            </tr>
25
+        %endfor
26
+    </table>
27
+

+ 23 - 0
pboard/pboard/templates/environ.mak View File

@@ -0,0 +1,23 @@
1
+<%inherit file="local:templates.master"/>
2
+
3
+<%def name="title()">
4
+  Learning TurboGears 2.3: Information about TG and WSGI
5
+</%def>
6
+
7
+<h2>The WSGI nature of the framework</h2>
8
+  <p>In this page you can see all the WSGI variables your request object has, 
9
+     the ones in capital letters are required by the spec, then a sorted by
10
+     component list of variables provided by the Components, and at last
11
+     the "wsgi." namespace with very useful information about your WSGI Server</p>
12
+  <p>The keys in the environment are: 
13
+  <table class="table">
14
+      %for key in sorted(environment):
15
+      <tr>
16
+          <td>${key}</td>
17
+          <td>${environment[key]}</td>
18
+      </tr>
19
+      %endfor
20
+  </table>
21
+
22
+  </p>
23
+

+ 22 - 0
pboard/pboard/templates/error.mak View File

@@ -0,0 +1,22 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+<html>
4
+
5
+<head>
6
+  <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
7
+  <title>A ${code} Error has Occurred </title>
8
+</head>
9
+
10
+<body>
11
+<h1>Error ${code}</h1>
12
+
13
+<%
14
+import re
15
+mf = re.compile(r'(</?)script', re.IGNORECASE)
16
+def fixmessage(message):
17
+    return mf.sub(r'\1noscript', message)
18
+%>
19
+
20
+<div>${fixmessage(message) | n}</div>
21
+</body>
22
+</html>

+ 66 - 0
pboard/pboard/templates/iconset.mak View File

@@ -0,0 +1,66 @@
1
+<%inherit file="local:templates.master"/>
2
+
3
+
4
+        <style>
5
+            body{
6
+                padding-top: 60px;
7
+            }
8
+            #icon_grid li{
9
+                width: 23%;
10
+            }
11
+        </style>
12
+
13
+        <div class="navbar navbar-inverse navbar-fixed-top">
14
+            <div class="navbar-inner">
15
+                <div class="container">
16
+                    <a class="brand" href="./index.html">Glyphicons</a>
17
+                </div>
18
+            </div>
19
+        </div>
20
+        
21
+        <div class="container">
22
+            
23
+            <div class="hero-unit">
24
+                List Of icons
25
+            </div>
26
+            
27
+            <div id="icon_grid">
28
+                <ul class="inline">
29
+
30
+                </ul>
31
+            </div>
32
+        </div>
33
+
34
+
35
+    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
36
+    <script>
37
+      $(document).ready(function() {
38
+        function matchStyle(className) {
39
+          var result = [];
40
+          for (var id = 0; id < document.styleSheets.length; id++) {
41
+            var classes = document.styleSheets[id].rules || document.styleSheets[id].cssRules;
42
+            for (var x = 0; x < classes.length; x++) {
43
+              // $('#icon_grid').append(classes[x].selectorText);
44
+              // $('#icon_grid').append("<p>bob ---</p>");
45
+              var item = classes[x];
46
+              if (classes[x]!=null) {
47
+                if(classes[x].selectorText!=null) {
48
+                  if (-1 < classes[x].selectorText.indexOf(className)) {
49
+                    result.push(classes[x].selectorText);
50
+                  }
51
+                }
52
+              }
53
+            }
54
+          }
55
+          return result;
56
+        }
57
+
58
+        var $iconList = matchStyle('.icon-g-');
59
+        var $grid = $('#icon_grid ul');
60
+        for (var key in $iconList) {
61
+          var icon = $iconList[key];
62
+          icon = icon.replace('.', '');
63
+          $grid.append($('<li>').append($('<i>').addClass(icon)).append(" " + icon));
64
+        }
65
+      });</script>
66
+

+ 142 - 0
pboard/pboard/templates/index.mak View File

@@ -0,0 +1,142 @@
1
+<%inherit file="local:templates.master"/>
2
+
3
+<%def name="title()">
4
+  Welcome to TurboGears 2.3, standing on the shoulders of giants, since 2007
5
+</%def>
6
+
7
+  <div class="row">
8
+    <div class="span9 hidden-phone hidden-tablet">
9
+      <div class="hero-unit">
10
+        <h1>pod <small>your information compagnion</small></h1>
11
+      </div>
12
+
13
+      <div class="row">
14
+        <div class="span3">
15
+          <h3>Store structured data</h3>
16
+          <ul>
17
+            <li>contact information,</li>
18
+            <li>notes, files,</li>
19
+            <li>todos, events, reminders,</li>
20
+            <li>...</li>
21
+          </ul>
22
+        </div>
23
+
24
+        <div class="span3">
25
+          <h3>Share information</h3>
26
+          <ul>
27
+            <li>Data is private, shared or public,</li>
28
+            <li>Send notification to co-workers,</li>
29
+            <li>Work together on the same data,</li>
30
+            <li>...</li>
31
+          </ul>
32
+        </div>
33
+
34
+        <div class="span3">
35
+          <h3>Manage Lifetime</h3>
36
+          <ul>
37
+            <li>Real life and information timelines,</li>
38
+            <li>Explore the life of information,</li>
39
+            <li>Create, open and close projects,</li>
40
+            <li>...</li>
41
+          </ul>
42
+        </div>
43
+      </div>
44
+
45
+      <div class="row">
46
+        <div class="span9">
47
+          <h3>Is it for me ?</h3>
48
+          <p>
49
+            You are prospecting clients? Looking for a job? Taking notes for your work? You're not sure ?
50
+          </p>
51
+          <p class="alert aler-warning">
52
+            Hey! What do you risk? Give it a try!
53
+          </p>
54
+        </div>
55
+      </div>
56
+      <div>
57
+        <h2>What can I do with pod ?</h2>
58
+        <ul style="list-style:none;">
59
+          <li><i class="icon-chevron-right"></i> Manage projects and tasks during their entire life:
60
+            <ul style="list-style:none;">
61
+              <li><i class="icon-chevron-right"></i> Create events and reminders</li>
62
+              <li><i class="icon-chevron-right"></i> Take and keep notes</li>
63
+              <li><i class="icon-chevron-right"></i> Keep contact information about people</li>
64
+              <li><i class="icon-chevron-right"></i> Organise data and information</li>
65
+            </ul>
66
+          </li>
67
+          <li>
68
+            <i class="icon-chevron-right"></i> Share up-to-date information:
69
+            <ul style="list-style:none;">
70
+              <li><i class="icon-chevron-right"></i> Organize and update information</li>
71
+              <li><i class="icon-chevron-right"></i> Send notifications to friends</li>
72
+              <li><i class="icon-chevron-right"></i> Manage information life</li>
73
+            </ul>
74
+          </li>
75
+        </ul>
76
+        If you see this page it means your installation was successful!</p>
77
+        <p>TurboGears 2 is rapid web application development toolkit designed to make your life easier.</p>
78
+        <p>
79
+          <a class="btn btn-primary btn-large" href="http://www.turbogears.org" target="_blank">
80
+            ${h.icon('book', True)} Learn more
81
+          </a>
82
+        </p>
83
+      </div>
84
+    </div>
85
+    <div class="span3">
86
+      <form class="well">
87
+        <fieldset>
88
+          <legend>Sign up</legend>
89
+          <input type="text" id="email" placeholder="Email"><br/>
90
+          <input type="text" id="password" placeholder="Password"><br/>
91
+          <input type="text" id="retype_password" placeholder="Retype your password"><br/>
92
+          <input type="submit" id="submit" value="Sign up" /><br/>
93
+        </fieldset>
94
+      </form>
95
+      
96
+      <div class="popover bottom">
97
+        <div class="arrow"></div>
98
+        <h3 class="popover-title">
99
+          Why to sign up ?
100
+        </h3>
101
+        <div>
102
+          <p>
103
+            blabla
104
+          </p>
105
+        </div>
106
+      </div>
107
+      <div class="alert alert-info">
108
+        <strong>Why to sign up ?</strong>
109
+      </div>
110
+      <div class="well">
111
+        <p>
112
+          <i class="icon-signal"></i> Make information live
113
+        </p>
114
+        <p>
115
+          <i class="icon-refresh"></i> Share up-to-date information
116
+        </p>
117
+        <p>
118
+          <i class="icon-list"></i> Manage tasks and projects
119
+        </p>
120
+      </div>
121
+    </div>
122
+  </div>
123
+
124
+  <div class="row">
125
+    <div class="span4">
126
+      <h3>Code your data model</h3>
127
+      <p> Design your data <code>model</code>, Create the database, and Add some bootstrap data.</p>
128
+    </div>
129
+
130
+    <div class="span4">
131
+      <h3>Design your URL architecture</h3>
132
+      <p> Decide your URLs, Program your <code>controller</code> methods, Design your
133
+        <code>templates</code>, and place some static files (CSS and/or Javascript). </p>
134
+    </div>
135
+
136
+    <div class="span4">
137
+      <h3>Distribute your app</h3>
138
+      <p> Test your source, Generate project documents, Build a distribution.</p>
139
+    </div>
140
+  </div>
141
+
142
+  <div class="notice"> Thank you for choosing TurboGears.</div>

+ 11 - 0
pboard/pboard/templates/login.mak View File

@@ -0,0 +1,11 @@
1
+<%inherit file="local:templates.master"/>
2
+<%def name="title()">Login Form</%def>
3
+<div id="loginform">
4
+<form action="${tg.url('/login_handler', params=dict(came_from=came_from, __logins=login_counter))}" method="POST" class="loginfields">
5
+    <h2><span>Login</span></h2>
6
+    <label for="login">Username:</label><input type="text" id="login" name="login" class="text"></input><br/>
7
+    <label for="password">Password:</label><input type="password" id="password" name="password" class="text"></input>
8
+    <label id="labelremember" for="loginremember">remember me</label><input type="checkbox" id="loginremember" name="remember" value="2252000"/>
9
+    <input type="submit" id="submit" value="Login" />
10
+</form>
11
+</div>

+ 63 - 0
pboard/pboard/templates/master.html View File

@@ -0,0 +1,63 @@
1
+<!--
2
+    Genshi template master file, this is here
3
+    to permit to extensions and pluggable applications
4
+    to always have a reliable master template
5
+-->
6
+<html xmlns="http://www.w3.org/1999/xhtml"
7
+      xmlns:py="http://genshi.edgewall.org/"
8
+      xmlns:xi="http://www.w3.org/2001/XInclude"
9
+      py:strip="">
10
+<head py:match="head" py:attrs="select('@*')">
11
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
12
+  <meta charset="${response.charset}" />
13
+  <title py:if="False">Your generic title goes here</title>
14
+  <meta py:replace="select('*')"/>
15
+  <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/bootstrap.min.css')}" />
16
+  <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/bootstrap-responsive.min.css')}" />
17
+  <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/style.css')}" />
18
+</head>
19
+
20
+<body py:match="body" py:attrs="select('@*')">
21
+  <div class="container">
22
+
23
+    <!-- Navbar -->
24
+    <div class="navbar">
25
+      <div class="navbar-inner">
26
+        <div class="container">
27
+          <a class="brand" href="#"><img src="${tg.url('/img/turbogears_logo.png')}" alt="TurboGears 2"/> ${getattr(tmpl_context, 'project_name', 'turbogears2')}</a>
28
+          <ul class="nav nav-pills">
29
+            <li class="${('', 'active')[defined('page') and page=='index']}"><a href="${tg.url('/')}">Welcome</a></li>
30
+            <li class="${('', 'active')[defined('page') and page=='about']}"><a href="${tg.url('/about')}">About</a></li>
31
+            <li class="${('', 'active')[defined('page') and page=='data']}"><a href="${tg.url('/data')}">Serving Data</a></li>
32
+            <li class="${('', 'active')[defined('page') and page=='environ']}"><a href="${tg.url('/environ')}">WSGI Environment</a></li>
33
+          </ul>
34
+          <ul class="nav pull-right" py:if="tg.auth_stack_enabled">
35
+            <li py:if="not request.identity"><a href="${tg.url('/login')}">Login</a></li>
36
+            <li py:if="request.identity"><a href="${tg.url('/logout_handler')}">Logout</a></li>
37
+            <li py:if="request.identity"><a href="${tg.url('/admin')}">Admin</a></li>
38
+          </ul>
39
+        </div>
40
+      </div>
41
+    </div>
42
+
43
+    <!-- Flash messages -->
44
+    <py:with vars="flash=tg.flash_obj.render('flash', use_js=False)">
45
+      <div class="row"><div class="span8 offset2">
46
+        <div py:if="flash" py:replace="Markup(flash)" />
47
+      </div></div>
48
+    </py:with>
49
+
50
+    <!-- Main included content -->
51
+    <div py:replace="select('*|text()')"/>
52
+
53
+    <!-- Footer included from an external template -->
54
+    <footer class="footer hidden-tablet hidden-phone">
55
+      <a class="pull-right" href="http://www.turbogears.org"><img style="vertical-align:middle;" src="${tg.url('/img/under_the_hood_blue.png')}" alt="TurboGears 2" /></a>
56
+      <p>Copyright &copy; ${getattr(tmpl_context, 'project_name', 'TurboGears2')} ${h.current_year()}</p>
57
+    </footer>
58
+  </div>
59
+
60
+  <script src="http://code.jquery.com/jquery.js"></script>
61
+  <script src="${tg.url('/javascript/bootstrap.min.js')}"></script>
62
+</body>
63
+</html>

+ 170 - 0
pboard/pboard/templates/master.mak View File

@@ -0,0 +1,170 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+    ${self.meta()}
5
+    <title>${self.title()}</title>
6
+    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/bootstrap.min.css')}" />
7
+    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/bootstrap-responsive.min.css')}" />
8
+    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/style.css')}" />
9
+    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/glyphicons.css')}" />
10
+
11
+    <style>
12
+      /* Wrapper for page content to push down footer */
13
+      #wrap {
14
+        min-height: 100%;
15
+        height: auto !important;
16
+        height: 100%;
17
+        /* Negative indent footer by it's height */
18
+        margin: 0 auto -60px;
19
+      }
20
+
21
+      /* Set the fixed height of the footer here */
22
+      #push,
23
+      #footer {
24
+        height: 60px;
25
+      }
26
+      #footer {
27
+        background-color: #f5f5f5;
28
+      }
29
+
30
+      /* Lastly, apply responsive CSS fixes as necessary */
31
+      @media (max-width: 767px) {
32
+        #footer {
33
+          margin-left: -20px;
34
+          margin-right: -20px;
35
+          padding-left: 20px;
36
+          padding-right: 20px;
37
+        }
38
+      }
39
+    </style>
40
+</head>
41
+<body class="${self.body_class()}">
42
+
43
+  <div class="container">
44
+    ${self.main_menu()}
45
+    ${self.content_wrapper()}
46
+    ${self.footer()}
47
+  </div>
48
+
49
+  <script src="http://code.jquery.com/jquery.js"></script>
50
+  <script src="${tg.url('/javascript/bootstrap.min.js')}"></script>
51
+
52
+<!-- WYSIWYG Text editor -->
53
+<link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css"></link>
54
+<!--link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.min.css"></link-->
55
+
56
+<script src="/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js"></script>
57
+<script src="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js"></script>
58
+
59
+<style>
60
+#addFolderNode {
61
+  width: 800px;
62
+  margin-left: -400px;
63
+}
64
+</style>
65
+
66
+  
67
+            <script>
68
+            $('#create_document_save_button').on('click', function(e){
69
+              // We don't want this to act as a link so cancel the link action
70
+              e.preventDefault();
71
+
72
+              // Find form and submit it
73
+              $('#create_document_form').submit();
74
+            });
75
+            </script>
76
+
77
+            <script>
78
+              $(document).ready(function() {
79
+                $('#data_content').wysihtml5();
80
+              });
81
+            </script>
82
+</body>
83
+
84
+<%def name="content_wrapper()">
85
+  <%
86
+    flash=tg.flash_obj.render('flash', use_js=False)
87
+  %>
88
+  % if flash:
89
+    <div class="row"><div class="span8 offset2">
90
+      ${flash | n}
91
+    </div></div>
92
+  % endif
93
+  ${self.body()}
94
+</%def>
95
+
96
+<%def name="body_class()"></%def>
97
+<%def name="meta()">
98
+  <meta charset="${response.charset}" />
99
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
100
+</%def>
101
+
102
+<%def name="title()">  </%def>
103
+
104
+<%def name="footer()">
105
+  <div class="footer hidden-tablet hidden-phone">
106
+    <p>Copyright &copy; pod project ${h.current_year()}</p>
107
+  </div>
108
+</%def>
109
+
110
+<%def name="main_menu()">
111
+  <div class="navbar">
112
+    <div class="navbar-inner">
113
+      <div class="container">
114
+        <a class="brand" href="#"><img src="${tg.url('/img/turbogears_logo.png')}" alt="TurboGears 2"/> <strong>pod</strong></a>
115
+        <div class="nav-collapse">
116
+          <ul class="nav">
117
+            <li class="active"><a href="${tg.url('/dashboard')}"><i class="icon-home icon-white"></i> Dashboard</a></li>
118
+            <li><a href="#">Link</a></li>
119
+            <li><a href="#">Link</a></li>
120
+            <li><a href="#">Link</a></li>
121
+          % if request.identity:
122
+            <li class="dropdown">
123
+              <a href="#" class="dropdown-toggle" data-toggle="dropdown">Admin <b class="caret"></b></a>
124
+              <ul class="dropdown-menu">
125
+                <li class="${('', 'active')[page=='admin']}"><a href="${tg.url('/admin')}">Manage</a></li>
126
+                <li class="${('', 'active')[page=='about']}"><a href="${tg.url('/about')}">About</a></li>
127
+                <li class="${('', 'active')[page=='data']}"><a href="${tg.url('/data')}">Serving Data</a></li>
128
+                <li class="${('', 'active')[page=='environ']}"><a href="${tg.url('/environ')}">WSGI Environment</a></li>
129
+              </ul>
130
+            </li>
131
+          % endif
132
+          </ul>
133
+          <ul class="nav pull-right">
134
+            % if not request.identity:
135
+              <li class="dropdown">
136
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> Login</a>
137
+                <ul class="dropdown-menu pull-right">
138
+                  <li class="text-center">
139
+                    <form action="${tg.url('/login_handler')}">
140
+                      <fieldset>
141
+                        <legend>Sign in</legend>
142
+                      <input class="span2" type="text" id="login" name="login" placeholder="email...">
143
+                      <input class="span2" type="password" id="password" name="password" placeholder="password...">
144
+                      <div class="span2 control-group">
145
+                        Remember me <input type="checkbox" id="loginremember" name="remember" value="2252000"/>
146
+                      </div>
147
+                      <input type="submit" id="submit" value="Login" />
148
+                      </fieldset>
149
+                    </form>
150
+                   <li class="divider"></li>
151
+                   <li><a href="">Register</a></li>
152
+                 </ul>
153
+              </li>
154
+            % else:
155
+              <li>
156
+                <a href="${tg.url('/logout_handler')}"><i class="icon-off"></i> Logout</a>
157
+              </li>
158
+            % endif
159
+          </ul>
160
+
161
+          <form class="navbar-search pull-right" action="">
162
+            <input type="text" class="search-query span2" placeholder="Search">
163
+          </form>
164
+        </div><!-- /.nav-collapse -->
165
+      </div><!-- /.container -->
166
+    </div><!-- /.navbar-inner -->
167
+  </div><!-- /.navbar -->
168
+</%def>
169
+
170
+</html>

+ 7 - 0
pboard/pboard/templates/simple_mako.mak View File

@@ -0,0 +1,7 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
2
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+<html>
4
+
5
+<body>
6
+</body>
7
+</html>

+ 69 - 0
pboard/pboard/tests/__init__.py View File

@@ -0,0 +1,69 @@
1
+# -*- coding: utf-8 -*-
2
+"""Unit and functional test suite for pboard."""
3
+
4
+from os import getcwd, path
5
+
6
+from paste.deploy import loadapp
7
+from webtest import TestApp
8
+
9
+from gearbox.commands.setup_app import SetupAppCommand
10
+from tg import config
11
+from tg.util import Bunch
12
+
13
+from pboard import model
14
+
15
+__all__ = ['setup_app', 'setup_db', 'teardown_db', 'TestController']
16
+
17
+application_name = 'main_without_authn'
18
+
19
+
20
+def load_app(name=application_name):
21
+    """Load the test application."""
22
+    return TestApp(loadapp('config:test.ini#%s' % name, relative_to=getcwd()))
23
+
24
+
25
+def setup_app():
26
+    """Setup the application."""
27
+    cmd = SetupAppCommand(Bunch(options=Bunch(verbose_level=1)), Bunch())
28
+    cmd.run(Bunch(config_file='config:test.ini', section_name=None))
29
+
30
+def setup_db():
31
+    """Create the database schema (not needed when you run setup_app)."""
32
+    engine = config['tg.app_globals'].sa_engine
33
+    model.init_model(engine)
34
+    model.metadata.create_all(engine)
35
+
36
+
37
+def teardown_db():
38
+    """Destroy the database schema."""
39
+    engine = config['tg.app_globals'].sa_engine
40
+    model.metadata.drop_all(engine)
41
+
42
+
43
+class TestController(object):
44
+    """Base functional test case for the controllers.
45
+
46
+    The pboard application instance (``self.app``) set up in this test
47
+    case (and descendants) has authentication disabled, so that developers can
48
+    test the protected areas independently of the :mod:`repoze.who` plugins
49
+    used initially. This way, authentication can be tested once and separately.
50
+
51
+    Check pboard.tests.functional.test_authentication for the repoze.who
52
+    integration tests.
53
+
54
+    This is the officially supported way to test protected areas with
55
+    repoze.who-testutil (http://code.gustavonarea.net/repoze.who-testutil/).
56
+
57
+    """
58
+
59
+    application_under_test = application_name
60
+
61
+    def setUp(self):
62
+        """Setup test fixture for each functional test method."""
63
+        self.app = load_app(self.application_under_test)
64
+        setup_app()
65
+
66
+    def tearDown(self):
67
+        """Tear down test fixture for each functional test method."""
68
+        model.DBSession.remove()
69
+        teardown_db()

+ 2 - 0
pboard/pboard/tests/functional/__init__.py View File

@@ -0,0 +1,2 @@
1
+# -*- coding: utf-8 -*-
2
+"""Functional test suite for the controllers of the application."""

+ 84 - 0
pboard/pboard/tests/functional/test_authentication.py View File

@@ -0,0 +1,84 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Integration tests for the :mod:`repoze.who`-powered authentication sub-system.
4
+
5
+As pboard grows and the authentication method changes, only these tests
6
+should be updated.
7
+
8
+"""
9
+from __future__ import unicode_literals
10
+
11
+from nose.tools import eq_, ok_
12
+
13
+from pboard.tests import TestController
14
+
15
+
16
+class TestAuthentication(TestController):
17
+    """
18
+    Tests for the default authentication setup.
19
+
20
+    If your application changes how the authentication layer is configured
21
+    those tests should be updated accordingly
22
+    """
23
+
24
+    application_under_test = 'main'
25
+
26
+    def test_forced_login(self):
27
+        """Anonymous users are forced to login
28
+
29
+        Test that anonymous users are automatically redirected to the login
30
+        form when authorization is denied. Next, upon successful login they
31
+        should be redirected to the initially requested page.
32
+
33
+        """
34
+        # Requesting a protected area
35
+        resp = self.app.get('/secc/', status=302)
36
+        ok_( resp.location.startswith('http://localhost/login'))
37
+        # Getting the login form:
38
+        resp = resp.follow(status=200)
39
+        form = resp.form
40
+        # Submitting the login form:
41
+        form['login'] = 'manager'
42
+        form['password'] = 'managepass'
43
+        post_login = form.submit(status=302)
44
+        # Being redirected to the initially requested page:
45
+        ok_(post_login.location.startswith('http://localhost/post_login'))
46
+        initial_page = post_login.follow(status=302)
47
+        ok_('authtkt' in initial_page.request.cookies,
48
+            "Session cookie wasn't defined: %s" % initial_page.request.cookies)
49
+        ok_(initial_page.location.startswith('http://localhost/secc/'),
50
+            initial_page.location)
51
+
52
+    def test_voluntary_login(self):
53
+        """Voluntary logins must work correctly"""
54
+        # Going to the login form voluntarily:
55
+        resp = self.app.get('/login', status=200)
56
+        form = resp.form
57
+        # Submitting the login form:
58
+        form['login'] = 'manager'
59
+        form['password'] = 'managepass'
60
+        post_login = form.submit(status=302)
61
+        # Being redirected to the home page:
62
+        ok_(post_login.location.startswith('http://localhost/post_login'))
63
+        home_page = post_login.follow(status=302)
64
+        ok_('authtkt' in home_page.request.cookies,
65
+            'Session cookie was not defined: %s' % home_page.request.cookies)
66
+        eq_(home_page.location, 'http://localhost/')
67
+
68
+    def test_logout(self):
69
+        """Logouts must work correctly"""
70
+        # Logging in voluntarily the quick way:
71
+        resp = self.app.get('/login_handler?login=manager&password=managepass',
72
+                            status=302)
73
+        resp = resp.follow(status=302)
74
+        ok_('authtkt' in resp.request.cookies,
75
+            'Session cookie was not defined: %s' % resp.request.cookies)
76
+        # Logging out:
77
+        resp = self.app.get('/logout_handler', status=302)
78
+        ok_(resp.location.startswith('http://localhost/post_logout'))
79
+        # Finally, redirected to the home page:
80
+        home_page = resp.follow(status=302)
81
+        authtkt = home_page.request.cookies.get('authtkt')
82
+        ok_(not authtkt or authtkt == 'INVALID',
83
+            'Session cookie was not deleted: %s' % home_page.request.cookies)
84
+        eq_(home_page.location, 'http://localhost/')

+ 73 - 0
pboard/pboard/tests/functional/test_root.py View File

@@ -0,0 +1,73 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Functional test suite for the root controller.
4
+
5
+This is an example of how functional tests can be written for controllers.
6
+
7
+As opposed to a unit-test, which test a small unit of functionality,
8
+functional tests exercise the whole application and its WSGI stack.
9
+
10
+Please read http://pythonpaste.org/webtest/ for more information.
11
+
12
+"""
13
+
14
+from nose.tools import ok_
15
+
16
+from pboard.tests import TestController
17
+
18
+
19
+class TestRootController(TestController):
20
+    """Tests for the method in the root controller."""
21
+
22
+    def test_index(self):
23
+        """The front page is working properly"""
24
+        response = self.app.get('/')
25
+        msg = 'TurboGears 2 is rapid web application development toolkit '\
26
+              'designed to make your life easier.'
27
+        # You can look for specific strings:
28
+        ok_(msg in response)
29
+
30
+        # You can also access a BeautifulSoup'ed response in your tests
31
+        # (First run $ easy_install BeautifulSoup
32
+        # and then uncomment the next two lines)
33
+
34
+        # links = response.html.findAll('a')
35
+        # print links
36
+        # ok_(links, "Mummy, there are no links here!")
37
+
38
+    def test_environ(self):
39
+        """Displaying the wsgi environ works"""
40
+        response = self.app.get('/environ.html')
41
+        ok_('The keys in the environment are: ' in response)
42
+
43
+    def test_data(self):
44
+        """The data display demo works with HTML"""
45
+        response = self.app.get('/data.html?a=1&b=2')
46
+        expected1 = """<td>a</td>\n                <td>1</td>"""
47
+        expected2 = """<td>b</td>\n                <td>2</td>"""
48
+        body = '\n'.join(response.text.splitlines())
49
+        ok_(expected1 in body, response)
50
+        ok_(expected2 in body, response)
51
+
52
+    def test_data_json(self):
53
+        """The data display demo works with JSON"""
54
+        resp = self.app.get('/data.json?a=1&b=2')
55
+        ok_(dict(page='data', params={'a':'1', 'b':'2'}) == resp.json, resp.json)
56
+
57
+    def test_secc_with_manager(self):
58
+        """The manager can access the secure controller"""
59
+        # Note how authentication is forged:
60
+        environ = {'REMOTE_USER': 'manager'}
61
+        resp = self.app.get('/secc', extra_environ=environ, status=200)
62
+        ok_('Secure Controller here' in resp.text, resp.text)
63
+
64
+    def test_secc_with_editor(self):
65
+        """The editor cannot access the secure controller"""
66
+        environ = {'REMOTE_USER': 'editor'}
67
+        self.app.get('/secc', extra_environ=environ, status=403)
68
+        # It's enough to know that authorization was denied with a 403 status
69
+
70
+    def test_secc_with_anonymous(self):
71
+        """Anonymous users must not access the secure controller"""
72
+        self.app.get('/secc', status=401)
73
+        # It's enough to know that authorization was denied with a 401 status

+ 64 - 0
pboard/pboard/tests/models/__init__.py View File

@@ -0,0 +1,64 @@
1
+# -*- coding: utf-8 -*-
2
+"""Unit test suite for the models of the application."""
3
+
4
+from nose.tools import eq_
5
+from pboard.model import DBSession
6
+from pboard.tests import load_app
7
+from pboard.tests import setup_db, teardown_db
8
+
9
+__all__ = ['ModelTest']
10
+
11
+
12
+def setup():
13
+    """Setup test fixture for all model tests."""
14
+    load_app()
15
+    setup_db()
16
+
17
+
18
+def teardown():
19
+    """Tear down test fixture for all model tests."""
20
+    teardown_db()
21
+
22
+
23
+class ModelTest(object):
24
+    """Base unit test case for the models."""
25
+
26
+    klass = None
27
+    attrs = {}
28
+
29
+    def setUp(self):
30
+        """Setup test fixture for each model test method."""
31
+        try:
32
+            new_attrs = {}
33
+            new_attrs.update(self.attrs)
34
+            new_attrs.update(self.do_get_dependencies())
35
+            self.obj = self.klass(**new_attrs)
36
+            DBSession.add(self.obj)
37
+            DBSession.flush()
38
+            return self.obj
39
+        except:
40
+            DBSession.rollback()
41
+            raise
42
+
43
+    def tearDown(self):
44
+        """Tear down test fixture for each model test method."""
45
+        DBSession.rollback()
46
+
47
+    def do_get_dependencies(self):
48
+        """Get model test dependencies.
49
+
50
+        Use this method to pull in other objects that need to be created
51
+        for this object to be build properly.
52
+
53
+        """
54
+        return {}
55
+
56
+    def test_create_obj(self):
57
+        """Model objects can be created"""
58
+        pass
59
+
60
+    def test_query_obj(self):
61
+        """Model objects can be queried"""
62
+        obj = DBSession.query(self.klass).one()
63
+        for key, value in self.attrs.items():
64
+            eq_(getattr(obj, key), value)

+ 52 - 0
pboard/pboard/tests/models/test_auth.py View File

@@ -0,0 +1,52 @@
1
+# -*- coding: utf-8 -*-
2
+"""Test suite for the TG app's models"""
3
+from __future__ import unicode_literals
4
+from nose.tools import eq_
5
+
6
+from pboard import model
7
+from pboard.tests.models import ModelTest
8
+
9
+class TestGroup(ModelTest):
10
+    """Unit test case for the ``Group`` model."""
11
+    klass = model.Group
12
+    attrs = dict(
13
+        group_name = "test_group",
14
+        display_name = "Test Group"
15
+        )
16
+
17
+
18
+class TestUser(ModelTest):
19
+    """Unit test case for the ``User`` model."""
20
+    
21
+    klass = model.User
22
+    attrs = dict(
23
+        user_name = "ignucius",
24
+        email_address = "ignucius@example.org"
25
+        )
26
+
27
+    def test_obj_creation_username(self):
28
+        """The obj constructor must set the user name right"""
29
+        eq_(self.obj.user_name, "ignucius")
30
+
31
+    def test_obj_creation_email(self):
32
+        """The obj constructor must set the email right"""
33
+        eq_(self.obj.email_address, "ignucius@example.org")
34
+
35
+    def test_no_permissions_by_default(self):
36
+        """User objects should have no permission by default."""
37
+        eq_(len(self.obj.permissions), 0)
38
+
39
+    def test_getting_by_email(self):
40
+        """Users should be fetcheable by their email addresses"""
41
+        him = model.User.by_email_address("ignucius@example.org")
42
+        eq_(him, self.obj)
43
+
44
+
45
+class TestPermission(ModelTest):
46
+    """Unit test case for the ``Permission`` model."""
47
+    
48
+    klass = model.Permission
49
+    attrs = dict(
50
+        permission_name = "test_permission",
51
+        description = "This is a test Description"
52
+        )

+ 19 - 0
pboard/pboard/websetup/__init__.py View File

@@ -0,0 +1,19 @@
1
+# -*- coding: utf-8 -*-
2
+"""Setup the pboard application"""
3
+
4
+import logging
5
+
6
+from pboard.config.environment import load_environment
7
+
8
+__all__ = ['setup_app']
9
+
10
+log = logging.getLogger(__name__)
11
+
12
+from .schema import setup_schema
13
+from .bootstrap import bootstrap
14
+
15
+def setup_app(command, conf, vars):
16
+    """Place any commands to setup pboard here"""
17
+    load_environment(conf.global_conf, conf.local_conf)
18
+    setup_schema(command, conf, vars)
19
+    bootstrap(command, conf, vars)

+ 55 - 0
pboard/pboard/websetup/bootstrap.py View File

@@ -0,0 +1,55 @@
1
+# -*- coding: utf-8 -*-
2
+"""Setup the pboard application"""
3
+from __future__ import print_function
4
+
5
+import logging
6
+from tg import config
7
+from pboard import model
8
+import transaction
9
+
10
+def bootstrap(command, conf, vars):
11
+    """Place any commands to setup pboard here"""
12
+
13
+    # <websetup.bootstrap.before.auth
14
+    from sqlalchemy.exc import IntegrityError
15
+    try:
16
+        u = model.User()
17
+        u.user_name = 'manager'
18
+        u.display_name = 'Example manager'
19
+        u.email_address = 'manager@somedomain.com'
20
+        u.password = 'managepass'
21
+    
22
+        model.DBSession.add(u)
23
+    
24
+        g = model.Group()
25
+        g.group_name = 'managers'
26
+        g.display_name = 'Managers Group'
27
+    
28
+        g.users.append(u)
29
+    
30
+        model.DBSession.add(g)
31
+    
32
+        p = model.Permission()
33
+        p.permission_name = 'manage'
34
+        p.description = 'This permission give an administrative right to the bearer'
35
+        p.groups.append(g)
36
+    
37
+        model.DBSession.add(p)
38
+    
39
+        u1 = model.User()
40
+        u1.user_name = 'editor'
41
+        u1.display_name = 'Example editor'
42
+        u1.email_address = 'editor@somedomain.com'
43
+        u1.password = 'editpass'
44
+    
45
+        model.DBSession.add(u1)
46
+        model.DBSession.flush()
47
+        transaction.commit()
48
+    except IntegrityError:
49
+        print('Warning, there was a problem adding your auth data, it may have already been added:')
50
+        import traceback
51
+        print(traceback.format_exc())
52
+        transaction.abort()
53
+        print('Continuing with bootstrapping...')
54
+
55
+    # <websetup.bootstrap.after.auth>

+ 28 - 0
pboard/pboard/websetup/schema.py View File

@@ -0,0 +1,28 @@
1
+# -*- coding: utf-8 -*-
2
+"""Setup the pboard application"""
3
+from __future__ import print_function
4
+
5
+import logging
6
+from tg import config
7
+import transaction
8
+
9
+def setup_schema(command, conf, vars):
10
+    """Place any commands to setup pboard here"""
11
+    # Load the models
12
+
13
+    # <websetup.websetup.schema.before.model.import>
14
+    from pboard import model
15
+    # <websetup.websetup.schema.after.model.import>
16
+
17
+    
18
+    # <websetup.websetup.schema.before.metadata.create_all>
19
+    print("Creating tables")
20
+    model.metadata.create_all(bind=config['tg.app_globals'].sa_engine)
21
+    # <websetup.websetup.schema.after.metadata.create_all>
22
+    transaction.commit()
23
+    print('Initializing Migrations')
24
+    import alembic.config, alembic.command
25
+    alembic_cfg = alembic.config.Config()
26
+    alembic_cfg.set_main_option("script_location", "migration")
27
+    alembic_cfg.set_main_option("sqlalchemy.url", config['sqlalchemy.url'])
28
+    alembic.command.stamp(alembic_cfg, "head")

+ 49 - 0
pboard/setup.cfg View File

@@ -0,0 +1,49 @@
1
+[egg_info]
2
+tag_build = dev
3
+tag_svn_revision = true
4
+
5
+# Babel configuration
6
+[compile_catalog]
7
+domain = pboard
8
+directory = pboard/i18n
9
+statistics = true
10
+
11
+[extract_messages]
12
+add_comments = TRANSLATORS:
13
+output_file = pboard/i18n/pboard.pot
14
+width = 80
15
+keywords = l_
16
+
17
+[init_catalog]
18
+domain = pboard
19
+input_file = pboard/i18n/pboard.pot
20
+output_dir = pboard/i18n
21
+
22
+[update_catalog]
23
+domain = pboard
24
+input_file = pboard/i18n/pboard.pot
25
+output_dir = pboard/i18n
26
+previous = true
27
+
28
+# Static files extraction for TW
29
+[archive_tw_resources]
30
+output = pboard/public/toscawidgets/
31
+distributions = pboard
32
+#yuicompressor = /home/someuser/bin/yuicompressor.jar
33
+#compresslevel = 2
34
+onepass = true
35
+
36
+[archive_tw2_resources]
37
+output = pboard/public/tw2/
38
+distributions = pboard
39
+force = true
40
+#yuicompressor = /home/someuser/bin/yuicompressor.jar
41
+#compresslevel = 2
42
+onepass = true
43
+
44
+[aliases]
45
+# A handy alias to make a release to pypi
46
+release = egg_info -RDb "" sdist bdist_egg register upload
47
+pboarddevelop = develop -i http://tg.gy/221
48
+pboarddeps = easy_install -i http://tg.gy/221 AddOns BytecodeAssembler Chameleon coverage DecoratorTools Extremes Genshi Jinja2 Kajiki kid PEAK_Rules repoze.who repoze.who_friendlyform repoze.who.plugins.sa simplegeneric sprox SQLAlchemy SymbolType tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms zope.interface zope.sqlalchemy
49
+tgupgrade = easy_install -i http://tg.gy/current -U AddOns Babel Beaker BytecodeAssembler Chameleon coverage decorator DecoratorTools Extremes Genshi Jinja2 Kajiki kid Mako MarkupSafe nose Paste PasteDeploy PasteScript PEAK_Rules Pygments Pylons repoze.who repoze.who_friendlyform repoze.who.plugins.sa simplegeneric simplejson sprox SQLAlchemy SymbolType Tempita tgext.admin tgext.crud ToscaWidgets transaction TurboJson TurboKid tw.forms WebError WebFlash WebHelpers WebOb WebTest zope.interface zope.sqlalchemy

+ 78 - 0
pboard/setup.py View File

@@ -0,0 +1,78 @@
1
+# -*- coding: utf-8 -*-
2
+#quickstarted Options:
3
+#
4
+# sqlalchemy: True
5
+# auth:       sqlalchemy
6
+# mako:       True
7
+#
8
+#
9
+
10
+#This is just a work-around for a Python2.7 issue causing
11
+#interpreter crash at exit when trying to log an info message.
12
+try:
13
+    import logging
14
+    import multiprocessing
15
+except:
16
+    pass
17
+
18
+import sys
19
+py_version = sys.version_info[:2]
20
+
21
+try:
22
+    from setuptools import setup, find_packages
23
+except ImportError:
24
+    from ez_setup import use_setuptools
25
+    use_setuptools()
26
+    from setuptools import setup, find_packages
27
+
28
+testpkgs=['WebTest >= 1.2.3',
29
+               'nose',
30
+               'coverage',
31
+               ]
32
+
33
+install_requires=[
34
+    "TurboGears2 >= 2.3.0b3",
35
+    "Babel",
36
+    "Genshi",
37
+    "Mako",
38
+    "zope.sqlalchemy >= 0.4",
39
+    "sqlalchemy",
40
+    "alembic",
41
+    "repoze.who",
42
+    "tw2.forms",
43
+    "tgext.admin >= 0.5.1",
44
+    ]
45
+
46
+setup(
47
+    name='pboard',
48
+    version='0.1',
49
+    description='',
50
+    author='',
51
+    author_email='',
52
+    #url='',
53
+    packages=find_packages(exclude=['ez_setup']),
54
+    install_requires=install_requires,
55
+    include_package_data=True,
56
+    test_suite='nose.collector',
57
+    tests_require=testpkgs,
58
+    package_data={'pboard': ['i18n/*/LC_MESSAGES/*.mo',
59
+                                 'templates/*/*',
60
+                                 'public/*/*']},
61
+    message_extractors={'pboard': [
62
+            ('**.py', 'python', None),
63
+            ('templates/**.mako', 'mako', None),
64
+            ('public/**', 'ignore', None)]},
65
+
66
+    entry_points={
67
+        'paste.app_factory': [
68
+            'main = pboard.config.middleware:make_app'
69
+        ],
70
+        'gearbox.plugins': [
71
+            'turbogears-devtools = tg.devtools'
72
+        ]
73
+    },
74
+    dependency_links=[
75
+        "http://tg.gy/230"
76
+        ],
77
+    zip_safe=False
78
+)

+ 0 - 0
pboard/test.ini View File


Some files were not shown because too many files changed in this diff