You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2017/03/13 08:45:45 UTC
[24/50] [abbrv] ignite git commit: IGNITE-4659 Migration to Webpack
2. Upgrade template engine from jade to pug.
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
deleted file mode 100644
index 0dd627a..0000000
--- a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.jade
+++ /dev/null
@@ -1,17 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, onChange: onChange, mode: "xml"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
new file mode 100644
index 0000000..0dd627a
--- /dev/null
+++ b/modules/web-console/frontend/app/directives/ui-ace-spring/ui-ace-spring.pug
@@ -0,0 +1,17 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+div(ng-if='ctrl.data' ignite-ace='{onLoad: onLoad, onChange: onChange, mode: "xml"}' ng-model='ctrl.data')
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form.jade b/modules/web-console/frontend/app/helpers/jade/form.jade
deleted file mode 100644
index c0c558d..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form.jade
+++ /dev/null
@@ -1,28 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-include ./form/form-field-feedback.jade
-include ./form/form-field-label.jade
-include ./form/form-field-text.jade
-include ./form/form-field-password.jade
-include ./form/form-field-dropdown.jade
-include ./form/form-field-datalist.jade
-include ./form/form-field-checkbox.jade
-include ./form/form-field-number.jade
-include ./form/form-field-up.jade
-include ./form/form-field-down.jade
-
-include ./form/form-group.jade
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form.pug b/modules/web-console/frontend/app/helpers/jade/form.pug
new file mode 100644
index 0000000..6fddbf6
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form.pug
@@ -0,0 +1,28 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+include ./form/form-field-feedback
+include ./form/form-field-label
+include ./form/form-field-text
+include ./form/form-field-password
+include ./form/form-field-dropdown
+include ./form/form-field-datalist
+include ./form/form-field-checkbox
+include ./form/form-field-number
+include ./form/form-field-up
+include ./form/form-field-down
+
+include ./form/form-group
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
deleted file mode 100644
index 222ecfe..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.jade
+++ /dev/null
@@ -1,38 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin form-field-checkbox(label, model, name, disabled, required, tip)
- div.checkbox.col-xs-12.col-sm-12.col-md-12
- label(id='{{ #{name} }}Label')
- .input-tip
- if block
- block
- else
- input(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- type='checkbox'
-
- data-ng-model=model
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}'
-
- data-ng-focus='tableReset()'
-
- data-ignite-form-panel-field=''
- )
- span #{label}
- i.tipLabel.icon-help(bs-tooltip='' data-title=tip)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
new file mode 100644
index 0000000..68a2dd2
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-checkbox.pug
@@ -0,0 +1,38 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin form-field-checkbox(label, model, name, disabled, required, tip)
+ div.checkbox.col-xs-12.col-sm-12.col-md-12
+ label(id=`{{ ${name} }}Label`)
+ .input-tip
+ if block
+ block
+ else
+ input(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ type='checkbox'
+
+ data-ng-model=model
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}`
+
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )
+ span #{label}
+ i.tipLabel.icon-help(bs-tooltip='' data-title=tip)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
deleted file mode 100644
index 4c1970e..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.jade
+++ /dev/null
@@ -1,51 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip)
- -var errLbl = label.substring(0, label.length - 1)
-
- mixin form-field-input()
- input.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- placeholder=placeholder
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
-
- bs-typeahead
- bs-options='item for item in #{options}'
- container='body'
- data-min-length='1'
- ignite-retain-selection
-
- data-ignite-form-panel-field=''
- )&attributes(attributes.attributes)
-
- .ignite-form-field
- +ignite-form-field__label(label, name, required)
- .ignite-form-field__control
- i.tipField.fa.icon-help(bs-tooltip='' data-title=tip)
-
- +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
- if block
- block
-
- .input-tip
- +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
new file mode 100644
index 0000000..e4b71af
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-datalist.pug
@@ -0,0 +1,51 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin form-field-datalist(label, model, name, disabled, required, placeholder, options, tip)
+ -var errLbl = label.substring(0, label.length - 1)
+
+ mixin form-field-input()
+ input.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ placeholder=placeholder
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+
+ bs-typeahead
+ bs-options=`item for item in ${options}`
+ container='body'
+ data-min-length='1'
+ ignite-retain-selection
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ .ignite-form-field
+ +ignite-form-field__label(label, name, required)
+ .ignite-form-field__control
+ i.tipField.fa.icon-help(bs-tooltip='' data-title=tip)
+
+ +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
deleted file mode 100644
index cd10ebe..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.jade
+++ /dev/null
@@ -1,18 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-down()
- i.tipField.fa.fa-arrow-down(ignite-form-field-down ng-click="$ctrl.down()")&attributes(attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
new file mode 100644
index 0000000..9361650
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-down.pug
@@ -0,0 +1,18 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-down()
+ i.tipField.fa.fa-arrow-down(ignite-form-field-down ng-click='$ctrl.down()')&attributes(attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
deleted file mode 100644
index 33af6d1..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.jade
+++ /dev/null
@@ -1,51 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)
- mixin form-field-input()
- button.select-toggle.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
-
- data-placeholder=placeholderEmpty ? '{{ #{options}.length > 0 ? "#{placeholder}" : "#{placeholderEmpty}" }}' : placeholder
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}' || '!#{options}.length'
-
- bs-select
- bs-options='item.value as item.label for item in #{options}'
-
- data-multiple=multiple ? '1' : false
- data-container='body > .wrapper'
-
- tabindex='0'
-
- data-ignite-form-panel-field=''
- )&attributes(attributes.attributes)
-
- .ignite-form-field
- +ignite-form-field__label(label, name, required)
- .ignite-form-field__control
- if tip
- i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
- if block
- block
-
- .input-tip
- +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
new file mode 100644
index 0000000..d7bd0fd
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-dropdown.pug
@@ -0,0 +1,51 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-dropdown(label, model, name, disabled, required, multiple, placeholder, placeholderEmpty, options, tip)
+ mixin form-field-input()
+ button.select-toggle.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+
+ data-placeholder=placeholderEmpty ? `{{ ${options}.length > 0 ? '${placeholder}' : '${placeholderEmpty}' }}` : placeholder
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}` || `!${options}.length`
+
+ bs-select
+ bs-options=`item.value as item.label for item in ${options}`
+
+ data-multiple=multiple ? '1' : false
+ data-container='body > .wrapper'
+
+ tabindex='0'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ .ignite-form-field
+ +ignite-form-field__label(label, name, required)
+ .ignite-form-field__control
+ if tip
+ i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
deleted file mode 100644
index ac1f080..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.jade
+++ /dev/null
@@ -1,32 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin form-field-feedback(name, error, message)
- -var __field = form + '[' + name + ']'
- -var __error = __field + '.$error.' + error
- -var __pristine = __field + '.$pristine'
-
- i.fa.fa-exclamation-triangle.form-field-feedback(
- ng-if='!#{__pristine} && #{__error}'
- name='{{ #{name} }}'
-
- bs-tooltip
- data-title=message
-
- ignite-error=error
- ignite-error-message=message
- ignite-restore-input-focus
- )
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
new file mode 100644
index 0000000..c70e7a3
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-feedback.pug
@@ -0,0 +1,32 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin form-field-feedback(name, error, message)
+ -var __field = `${form}[${name}]`
+ -var __error = `${__field}.$error.${error}`
+ -var __pristine = `${__field}.$pristine`
+
+ i.fa.fa-exclamation-triangle.form-field-feedback(
+ ng-if=`!${__pristine} && ${__error}`
+ name=`{{ ${name} }}`
+
+ bs-tooltip
+ data-title=message
+
+ ignite-error=error
+ ignite-error-message=message
+ ignite-restore-input-focus
+ )
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
deleted file mode 100644
index d6aef81..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.jade
+++ /dev/null
@@ -1,23 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field__label(label, name, required)
- label.ignite-form-field__label(
- id='{{ #{name} }}Label'
- for='{{ #{name} }}Input'
- class="{{ #{required} ? 'required' : '' }}"
- )
- span !{label}
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
new file mode 100644
index 0000000..d0275c9
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-label.pug
@@ -0,0 +1,23 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field__label(label, name, required)
+ label.ignite-form-field__label(
+ id=`{{ ${name} }}Label`
+ for=`{{ ${name} }}Input`
+ class=`{{ ${required} ? 'required' : '' }}`
+ )
+ span !{label}
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
deleted file mode 100644
index 58b0dcd..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.jade
+++ /dev/null
@@ -1,53 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip)
- mixin form-field-input()
- input.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- placeholder=placeholder
- type='number'
-
- min=min ? min : '0'
- max=max ? max : '{{ Number.MAX_VALUE }}'
- step=step ? step : '1'
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}'
- data-ng-focus='tableReset()'
-
- data-ignite-form-panel-field=''
- )&attributes(attributes.attributes)
-
- .ignite-form-field
- +ignite-form-field__label(label, name, required)
- .ignite-form-field__control
- if tip
- i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
- +form-field-feedback(name, 'required', 'This field could not be empty')
- +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0)
- +form-field-feedback(name, 'max', 'Value is more than allowable maximum: '+ max)
- +form-field-feedback(name, 'number', 'Only numbers allowed')
-
- if block
- block
-
- .input-tip
- +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
new file mode 100644
index 0000000..dd41849
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-number.pug
@@ -0,0 +1,53 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-number(label, model, name, disabled, required, placeholder, min, max, step, tip)
+ mixin form-field-input()
+ input.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ placeholder=placeholder
+ type='number'
+
+ min=min ? min : '0'
+ max=max ? max : '{{ Number.MAX_VALUE }}'
+ step=step ? step : '1'
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}`
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes.attributes)
+
+ .ignite-form-field
+ +ignite-form-field__label(label, name, required)
+ .ignite-form-field__control
+ if tip
+ i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+ +form-field-feedback(name, 'required', 'This field could not be empty')
+ +form-field-feedback(name, 'min', 'Value is less than allowable minimum: '+ min || 0)
+ +form-field-feedback(name, 'max', 'Value is more than allowable maximum: '+ max)
+ +form-field-feedback(name, 'number', 'Only numbers allowed')
+
+ if block
+ block
+
+ .input-tip
+ +form-field-input(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
deleted file mode 100644
index e5e7bc8..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.jade
+++ /dev/null
@@ -1,47 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-password-input(name, model, disabled, required, placeholder)
- input.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- placeholder=placeholder
- type='password'
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}'
- data-ng-focus='tableReset()'
-
- data-ignite-form-panel-field=''
- )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {})
-
-mixin ignite-form-field-password(label, model, name, disabled, required, placeholder, tip)
- -var errLbl = label.substring(0, label.length - 1)
-
- .ignite-form-field
- +ignite-form-field__label(label, name, required)
- .ignite-form-field__control
- i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
- if block
- block
-
- +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
- .input-tip
- +ignite-form-field-password-input(name, model, disabled, required, placeholder)(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
new file mode 100644
index 0000000..a12982f
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-password.pug
@@ -0,0 +1,47 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-password-input(name, model, disabled, required, placeholder)
+ input.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ placeholder=placeholder
+ type='password'
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}`
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes : {})
+
+mixin ignite-form-field-password(label, model, name, disabled, required, placeholder, tip)
+ -var errLbl = label.substring(0, label.length - 1)
+
+ .ignite-form-field
+ +ignite-form-field__label(label, name, required)
+ .ignite-form-field__control
+ i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+ if block
+ block
+
+ +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+ .input-tip
+ +ignite-form-field-password-input(name, model, disabled, required, placeholder)(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
deleted file mode 100644
index 1f93d3b..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.jade
+++ /dev/null
@@ -1,64 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-input(name, model, disabled, required, placeholder)
- input.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- placeholder=placeholder
- type='text'
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}'
- data-ng-focus='tableReset()'
-
- data-ignite-form-panel-field=''
- )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
-
-mixin ignite-form-field-url-input(name, model, disabled, required, placeholder)
- input.form-control(
- id='{{ #{name} }}Input'
- name='{{ #{name} }}'
- placeholder=placeholder
- type='url'
-
- data-ng-model=model
-
- data-ng-required=required && '#{required}'
- data-ng-disabled=disabled && '#{disabled}'
- data-ng-focus='tableReset()'
-
- data-ignite-form-panel-field=''
- )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
-
-mixin ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)
- -var errLbl = label.substring(0, label.length - 1)
-
- .ignite-form-field
- +ignite-form-field__label(label, name, required)
- .ignite-form-field__control
- if tip
- i.tipField.icon-help(bs-tooltip='' data-title=tip)
-
- if block
- block
-
- +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
-
- .input-tip
- +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
new file mode 100644
index 0000000..76ea6e6
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-text.pug
@@ -0,0 +1,64 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-input(name, model, disabled, required, placeholder)
+ input.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ placeholder=placeholder
+ type='text'
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}`
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
+
+mixin ignite-form-field-url-input(name, model, disabled, required, placeholder)
+ input.form-control(
+ id=`{{ ${name} }}Input`
+ name=`{{ ${name} }}`
+ placeholder=placeholder
+ type='url'
+
+ data-ng-model=model
+
+ data-ng-required=required && `${required}`
+ data-ng-disabled=disabled && `${disabled}`
+ data-ng-focus='tableReset()'
+
+ data-ignite-form-panel-field=''
+ )&attributes(attributes ? attributes.attributes ? attributes.attributes : attributes: {})
+
+mixin ignite-form-field-text(label, model, name, disabled, required, placeholder, tip)
+ -var errLbl = label.substring(0, label.length - 1)
+
+ .ignite-form-field
+ +ignite-form-field__label(label, name, required)
+ .ignite-form-field__control
+ if tip
+ i.tipField.icon-help(bs-tooltip='' data-title=tip)
+
+ if block
+ block
+
+ +form-field-feedback(name, 'required', errLbl + ' could not be empty!')
+
+ .input-tip
+ +ignite-form-field-input(name, model, disabled, required, placeholder)(attributes=attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
deleted file mode 100644
index c66cd0e..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.jade
+++ /dev/null
@@ -1,18 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-field-up()
- i.tipField.fa.fa-arrow-up.ng-scope(ignite-form-field-up ng-click="$ctrl.up()")&attributes(attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
new file mode 100644
index 0000000..5b65201
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-field-up.pug
@@ -0,0 +1,18 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-field-up()
+ i.tipField.fa.fa-arrow-up.ng-scope(ignite-form-field-up ng-click='$ctrl.up()')&attributes(attributes)
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-group.jade b/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
deleted file mode 100644
index 8fb7b1f..0000000
--- a/modules/web-console/frontend/app/helpers/jade/form/form-group.jade
+++ /dev/null
@@ -1,23 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-mixin ignite-form-group()
- .group-section(ignite-form-group)&attributes(attributes)
- .group(ng-if='true' ng-init='group = {}')
- .group-legend
- label {{::group.label}}
- if block
- block
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/form/form-group.pug b/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
new file mode 100644
index 0000000..8fb7b1f
--- /dev/null
+++ b/modules/web-console/frontend/app/helpers/jade/form/form-group.pug
@@ -0,0 +1,23 @@
+//-
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+mixin ignite-form-group()
+ .group-section(ignite-form-group)&attributes(attributes)
+ .group(ng-if='true' ng-init='group = {}')
+ .group-legend
+ label {{::group.label}}
+ if block
+ block
http://git-wip-us.apache.org/repos/asf/ignite/blob/1080e686/modules/web-console/frontend/app/helpers/jade/mixins.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/helpers/jade/mixins.jade b/modules/web-console/frontend/app/helpers/jade/mixins.jade
deleted file mode 100644
index 6ca41f6..0000000
--- a/modules/web-console/frontend/app/helpers/jade/mixins.jade
+++ /dev/null
@@ -1,609 +0,0 @@
-//-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-include ./form.jade
-
-//- Mixin for advanced options toggle.
-mixin advanced-options-toggle(click, cond, showMessage, hideMessage)
- .advanced-options
- i.fa(ng-click='#{click}' ng-class='#{cond} ? "fa-chevron-circle-down" : "fa-chevron-circle-right"')
- a(ng-click=click) {{#{cond} ? '#{hideMessage}' : '#{showMessage}'}}
-
-//- Mixin for advanced options toggle with default settings.
-mixin advanced-options-toggle-default
- +advanced-options-toggle('toggleExpanded()', 'ui.expanded', 'Show advanced settings...', 'Hide advanced settings...')
-
-//- Mixin for main table on screen with list of items.
-mixin main-table(title, rows, focusId, click, rowTemplate, searchField)
- .padding-bottom-dflt(ng-show='#{rows} && #{rows}.length > 0')
- table.links(st-table='displayedRows' st-safe-src='#{rows}')
- thead
- tr
- th
- lable.labelHeader.labelFormField #{title}:
- .col-sm-3.pull-right(style='padding: 0')
- input.form-control(type='text' st-search='#{searchField}' placeholder='Filter #{title}...')
- tbody
- tr
- td
- .scrollable-y(ng-show='displayedRows.length > 0' style='max-height: 200px')
- table
- tbody
- tr(ng-repeat='row in displayedRows track by row._id' ignite-bs-affix-update)
- td
- a(ng-class='{active: row._id == selectedItem._id}' ignite-on-click-focus=focusId ng-click=click) #{rowTemplate}
- label.placeholder(ng-show='displayedRows.length == 0') No #{title} found
-
-//- Mixin with save, remove, clone and undo buttons.
-mixin save-remove-clone-undo-buttons(objectName)
- -var removeTip = '"Remove current ' + objectName + '"'
- -var cloneTip = '"Clone current ' + objectName + '"'
- -var undoTip = '"Undo all changes for current ' + objectName + '"'
-
- div(ng-show='contentVisible()' style='display: inline-block;')
- .panel-tip-container(ng-hide='!backupItem || backupItem._id')
- a.btn.btn-primary(ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title='{{saveBtnTipText(ui.inputForm.$dirty, "#{objectName}")}}' data-placement='bottom' data-trigger='hover') Save
- .panel-tip-container(ng-show='backupItem._id')
- a.btn.btn-primary(id='save-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && saveItem()' bs-tooltip='' data-title='{{saveBtnTipText(ui.inputForm.$dirty, "#{objectName}")}}' data-placement='bottom' data-trigger='hover') Save
- .panel-tip-container(ng-show='backupItem._id')
- a.btn.btn-primary(id='clone-item' ng-click='cloneItem()' bs-tooltip=cloneTip data-placement='bottom' data-trigger='hover') Clone
- .btn-group.panel-tip-container(ng-show='backupItem._id')
- button.btn.btn-primary(id='remove-item' ng-click='removeItem()' bs-tooltip=removeTip data-placement='bottom' data-trigger='hover') Remove
- button.btn.dropdown-toggle.btn-primary(id='remove-item-dropdown' data-toggle='dropdown' data-container='body' bs-dropdown='[{ text: "Remove All", click: "removeAllItems()" }]' data-placement='bottom-right')
- span.caret
- .panel-tip-container(ng-show='backupItem')
- i.btn.btn-primary.fa.fa-undo(id='undo-item' ng-disabled='!ui.inputForm.$dirty' ng-click='ui.inputForm.$dirty && resetAll()' bs-tooltip=undoTip data-placement='bottom' data-trigger='hover')
-
-//- Mixin for feedback on specified error.
-mixin error-feedback(visible, error, errorMessage, name)
- i.fa.fa-exclamation-triangle.form-control-feedback(
- ng-if=visible
- bs-tooltip='"#{errorMessage}"'
- ignite-error=error
- ignite-error-message=errorMessage
- name=name
- )
-
-//- Mixin for feedback on unique violation.
-mixin unique-feedback(name, errorMessage)
- +form-field-feedback(name, 'igniteUnique', errorMessage)
-
-//- Mixin for feedback on IP address violation.
-mixin ipaddress-feedback(name)
- +form-field-feedback(name, 'ipaddress', 'Invalid address!')
-
-//- Mixin for feedback on port of IP address violation.
-mixin ipaddress-port-feedback(name)
- +form-field-feedback(name, 'ipaddressPort', 'Invalid port!')
-
-//- Mixin for feedback on port range violation.
-mixin ipaddress-port-range-feedback(name)
- +form-field-feedback(name, 'ipaddressPortRange', 'Invalid port range!')
-
-//- Mixin for feedback on UUID violation.
-mixin uuid-feedback(name)
- +form-field-feedback(name, 'uuid', 'Invalid node ID!')
-
-//- Function that convert enabled state to corresponding disabled state.
--var enabledToDisabled = function (enabled) {
-- return (enabled === false || enabled === true) ? !enabled : '!(' + enabled + ')';
--}
-
-//- Mixin for checkbox.
-mixin checkbox(lbl, model, name, tip)
- +form-field-checkbox(lbl, model, name, false, false, tip)
-
-//- Mixin for checkbox with enabled condition.
-mixin checkbox-enabled(lbl, model, name, enabled, tip)
- +form-field-checkbox(lbl, model, name, enabledToDisabled(enabled), false, tip)
-
-//- Mixin for Java class name field with auto focus condition.
-mixin java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, placeholder, tip, validationActive)
- -var errLbl = lbl.substring(0, lbl.length - 1)
-
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
- data-java-identifier='true'
- data-java-package-specified='true'
- data-java-keywords='true'
- data-java-built-in-class='true'
- data-ignite-form-field-input-autofocus=autofocus
- data-validation-active=validationActive ? '{{ #{validationActive} }}' : '"always"'
- )
- if block
- block
-
- +form-field-feedback(name, 'javaBuiltInClass', errLbl + ' should not be the Java built-in class!')
- +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
- +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
- +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
-
-//- Mixin for Java class name field with auto focus condition.
-mixin java-class-autofocus(lbl, model, name, enabled, required, autofocus, tip, validationActive)
- +java-class-autofocus-placholder(lbl, model, name, enabled, required, autofocus, 'Enter fully qualified class name', tip, validationActive)
- if block
- block
-
-//- Mixin for Java class name field.
-mixin java-class(lbl, model, name, enabled, required, tip, validationActive)
- +java-class-autofocus(lbl, model, name, enabled, required, 'false', tip, validationActive)
- if block
- block
-
-//- Mixin for text field with enabled condition with options.
-mixin java-class-typeahead(lbl, model, name, options, enabled, required, placeholder, tip, validationActive)
- -var errLbl = lbl.substring(0, lbl.length - 1)
-
- +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)(
- data-java-identifier='true'
- data-java-package-specified='allow-built-in'
- data-java-keywords='true'
- data-validation-active=validationActive ? '{{ #{validationActive} }}' : '"always"'
- )
- +form-field-feedback(name, 'javaKeywords', errLbl + ' could not contains reserved Java keyword!')
- +form-field-feedback(name, 'javaPackageSpecified', errLbl + ' does not have package specified!')
- +form-field-feedback(name, 'javaIdentifier', errLbl + ' is invalid Java identifier!')
-
-//- Mixin for java package field with enabled condition.
-mixin java-package(lbl, model, name, enabled, required, tip)
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, 'Enter package name', tip)(
- data-java-keywords='true'
- data-java-package-name='package-only'
- )
- +form-field-feedback(name, 'javaPackageName', 'Package name is invalid')
- +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved java keyword')
-
-//- Mixin for text field with IP address check.
-mixin text-ip-address(lbl, model, name, enabled, placeholder, tip)
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true')
- +ipaddress-feedback(name)
-
-//- Mixin for text field with IP address and port range check.
-mixin text-ip-address-with-port-range(lbl, model, name, enabled, placeholder, tip)
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), false, placeholder, tip)(data-ipaddress='true' data-ipaddress-with-port='true' data-ipaddress-with-port-range='true')
- +ipaddress-feedback(name)
- +ipaddress-port-feedback(name)
- +ipaddress-port-range-feedback(name)
-
-//- Mixin for text field.
-mixin text-enabled(lbl, model, name, enabled, required, placeholder, tip)
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)
- if block
- block
-
-//- Mixin for text field with autofocus.
-mixin text-enabled-autofocus(lbl, model, name, enabled, required, placeholder, tip)
- +ignite-form-field-text(lbl, model, name, enabledToDisabled(enabled), required, placeholder, tip)(
- data-ignite-form-field-input-autofocus='true'
- )
- if block
- block
-
-//- Mixin for text field.
-mixin text(lbl, model, name, required, placeholder, tip)
- +ignite-form-field-text(lbl, model, name, false, required, placeholder, tip)
- if block
- block
-
-//- Mixin for password field.
-mixin password(lbl, model, name, required, placeholder, tip)
- +ignite-form-field-password(lbl, model, name, false, required, placeholder, tip)
- if block
- block
-
-//- Mixin for text field with enabled condition with options.
-mixin text-options(lbl, model, name, options, enabled, required, placeholder, tip)
- +form-field-datalist(lbl, model, name, enabledToDisabled(enabled), required, placeholder, options, tip)
-
-//- Mixin for required numeric field.
-mixin number-required(lbl, model, name, enabled, required, placeholder, min, tip)
- +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), required, placeholder, min, false, false, tip)
-
-//- Mixin for required numeric field with maximum and minimum limit.
-mixin number-min-max(lbl, model, name, enabled, placeholder, min, max, tip)
- +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, '1', tip)
-
-//- Mixin for required numeric field with maximum and minimum limit.
-mixin number-min-max-step(lbl, model, name, enabled, placeholder, min, max, step, tip)
- +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, max, step, tip)
-
-//- Mixin for numeric field.
-mixin number(lbl, model, name, enabled, placeholder, min, tip)
- +ignite-form-field-number(lbl, model, name, enabledToDisabled(enabled), false, placeholder, min, false, false, tip)
-
-//- Mixin for required dropdown field.
-mixin dropdown-required-empty(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)
- if block
- block
-
-//- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-empty-autofocus(lbl, model, name, enabled, required, placeholder, placeholderEmpty, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, placeholderEmpty, options, tip)(
- data-ignite-form-field-input-autofocus='true'
- )
- if block
- block
-
-//- Mixin for required dropdown field.
-mixin dropdown-required(lbl, model, name, enabled, required, placeholder, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)
- if block
- block
-
-//- Mixin for required dropdown field with autofocus.
-mixin dropdown-required-autofocus(lbl, model, name, enabled, required, placeholder, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), required, false, placeholder, '', options, tip)(
- data-ignite-form-field-input-autofocus='true'
- )
- if block
- block
-
-//- Mixin for dropdown field.
-mixin dropdown(lbl, model, name, enabled, placeholder, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, false, placeholder, '', options, tip)
- if block
- block
-
-//- Mixin for dropdown-multiple field.
-mixin dropdown-multiple(lbl, model, name, enabled, placeholder, placeholderEmpty, options, tip)
- +ignite-form-field-dropdown(lbl, model, name, enabledToDisabled(enabled), false, true, placeholder, placeholderEmpty, options, tip)
- if block
- block
-
-//- Mixin for table text field.
-mixin table-text-field(name, model, items, valid, save, placeholder, newItem)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- if block
- block
-
- .input-tip
- +ignite-form-field-input(name, model, false, 'true', placeholder)(
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table java class field.
-mixin table-java-class-field(lbl, name, model, items, valid, save, newItem)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- +form-field-feedback(name, 'javaBuiltInClass', lbl + ' should not be the Java built-in class!')
- +form-field-feedback(name, 'javaKeywords', lbl + ' could not contains reserved Java keyword!')
- +form-field-feedback(name, 'javaPackageSpecified', lbl + ' does not have package specified!')
- +form-field-feedback(name, 'javaIdentifier', lbl + ' is invalid Java identifier!')
-
- if block
- block
-
- .input-tip
- +ignite-form-field-input(name, model, false, 'true', 'Enter fully qualified class name')(
- data-java-identifier='true'
- data-java-package-specified='true'
- data-java-keywords='true'
- data-java-built-in-class='true'
-
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table java package field.
-mixin table-java-package-field(name, model, items, valid, save, newItem)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- +form-field-feedback(name, 'javaKeywords', 'Package name could not contains reserved Java keyword!')
- +form-field-feedback(name, 'javaPackageName', 'Package name is invalid!')
-
- if block
- block
-
- .input-tip
- +ignite-form-field-input(name, model, false, 'true', 'Enter package name')(
- data-java-keywords='true'
- data-java-package-name='package-only'
-
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table java package field.
-mixin table-url-field(name, model, items, valid, save, newItem)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- if block
- block
-
- .input-tip
- +ignite-form-field-url-input(name, model, false, 'true', 'Enter URL')(
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table address field.
-mixin table-address-field(name, model, items, valid, save, newItem, portRange)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- +ipaddress-feedback(name)
- +ipaddress-port-feedback(name)
- +ipaddress-port-range-feedback(name)
- +form-field-feedback(name, 'required', 'IP address:port could not be empty!')
-
- if block
- block
-
- .input-tip
- +ignite-form-field-input(name, model, false, 'true', 'IP address:port')(
- data-ipaddress='true'
- data-ipaddress-with-port='true'
- data-ipaddress-with-port-range=portRange ? 'true' : null
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table UUID field.
-mixin table-uuid-field(name, model, items, valid, save, newItem)
- -var resetOnEnter = newItem ? '(stopblur = true) && (group.add = [{}])' : '(field.edit = false)'
- -var onEnter = valid + ' && (' + save + '); ' + valid + ' && ' + resetOnEnter + ';'
-
- -var onEscape = newItem ? 'group.add = []' : 'field.edit = false'
-
- -var resetOnBlur = newItem ? '!stopblur && (group.add = [])' : 'field.edit = false'
- -var onBlur = valid + ' && ( ' + save + '); ' + resetOnBlur + ';'
-
- div(ignite-on-focus-out=onBlur)
- if block
- block
-
- .input-tip
- +ignite-form-field-input(name, model, false, 'true', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')(
- data-uuid='true'
- data-ignite-unique=items
- data-ignite-form-field-input-autofocus='true'
-
- ignite-on-enter=onEnter
- ignite-on-escape=onEscape
- )
-
-//- Mixin for table save button.
- "||" used instead of "&&" to workaround escaping of "&&" to "&&"
-mixin table-save-button(valid, save, newItem)
- -var reset = newItem ? 'group.add = []' : 'field.edit = false'
-
- i.fa.fa-floppy-o.form-field-save(
- ng-show=valid
- ng-click='!(#{valid}) || (#{save}); !(#{valid}) || (#{reset});'
- bs-tooltip
- data-title='Click icon or press [Enter] to save item'
- )
-
-//- Mixin for table remove button.
-mixin table-remove-conditional-button(items, show, tip, row)
- i.tipField.fa.fa-remove(
- ng-hide='!#{show} || field.edit'
- bs-tooltip
- data-title=tip
- ng-click='#{items}.splice(#{items}.indexOf(#{row}), 1)'
- )
-
-//- Mixin for table remove button.
-mixin table-remove-button(items, tip)
- +table-remove-conditional-button(items, 'true', tip, 'model')
-
-//- Mixin for cache mode.
-mixin cacheMode(lbl, model, name, placeholder)
- +dropdown(lbl, model, name, 'true', placeholder,
- '[\
- {value: "LOCAL", label: "LOCAL"},\
- {value: "REPLICATED", label: "REPLICATED"},\
- {value: "PARTITIONED", label: "PARTITIONED"}\
- ]',
- 'Cache modes:\
- <ul>\
- <li>PARTITIONED - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes</li>\
- <li>REPLICATED - in this mode all the keys are distributed to all participating nodes</li>\
- <li>LOCAL - in this mode caches residing on different grid nodes will not know about each other</li>\
- </ul>'
- )
-
-//- Mixin for eviction policy.
-mixin evictionPolicy(model, name, enabled, required, tip)
- -var kind = model + '.kind'
- -var policy = model + '[' + kind + ']'
-
- +dropdown-required('Eviction policy:', kind, name + '+ "Kind"', enabled, required, 'Not set',
- '[\
- {value: "LRU", label: "LRU"},\
- {value: "FIFO", label: "FIFO"},\
- {value: "SORTED", label: "Sorted"},\
- {value: undefined, label: "Not set"}\
- ]', tip)
- span(ng-show=kind)
- +showHideLink('expanded', 'settings')
- .details-row
- +number('Batch size', policy + '.batchSize', name + '+ "batchSize"', enabled, '1', '1',
- 'Number of entries to remove on shrink')
- .details-row
- +number('Max memory size', policy + '.maxMemorySize', name + '+ "maxMemorySize"', enabled, '0', '0',
- 'Maximum allowed cache size in bytes')
- .details-row
- +number('Max size', policy + '.maxSize', name + '+ "maxSize"', enabled, '100000', '0',
- 'Maximum allowed size of cache before entry will start getting evicted')
-
-//- Mixin for clusters dropdown.
-mixin clusters(model, tip)
- +dropdown-multiple('<span>Clusters:</span>' + '<a ui-sref="base.configuration.clusters({linkId: linkId()})"> (add)</a>',
- model + '.clusters', '"clusters"', true, 'Choose clusters', 'No clusters configured', 'clusters', tip)
-
-//- Mixin for caches dropdown.
-mixin caches(model, tip)
- +dropdown-multiple('<span>Caches:</span>' + '<a ui-sref="base.configuration.caches({linkId: linkId()})"> (add)</a>',
- model + '.caches', '"caches"', true, 'Choose caches', 'No caches configured', 'caches', tip)
-
-//- Mixin for XML, Java, .Net preview.
-mixin preview(master, generator, detail)
- ignite-ui-ace-tabs
- .preview-panel(ng-init='mode = "spring"')
- .preview-legend
- a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
- a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
- a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
- //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
- .preview-content(ng-switch='mode')
- ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- .preview-content-empty(ng-if='!data')
- label All Defaults
-
-//- Mixin for XML and Java preview.
-mixin preview-xml-java(master, generator, detail)
- ignite-ui-ace-tabs
- .preview-panel(ng-init='mode = "spring"')
- .preview-legend
- a(ng-class='{active: mode === "spring"}' ng-click='mode = "spring"') Spring
- a(ng-class='{active: mode === "java"}' ng-click='mode = "java"') Java
- //a(ng-class='{active: mode === "csharp"}' ng-click='mode = "csharp"') C#
- //a(ng-class='{active: mode === "app.config"}' ng-click='mode = "app.config"') app.config
- .preview-content(ng-switch='mode')
- ignite-ui-ace-spring(ng-switch-when="spring" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- ignite-ui-ace-java(ng-switch-when="java" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- //ignite-ui-ace-sharp(ng-switch-when="csharp" data-master=master data-generator=generator ng-model='$parent.data' data-detail=detail)
- .preview-content-empty(ng-if='!data')
- label All Defaults
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-save(show, click)
- i.tipField.fa.fa-floppy-o(ng-show=show ng-click=click bs-tooltip='' data-title='Click icon or press [Enter] to save item' data-trigger='hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-add(click, tip)
- i.tipField.fa.fa-plus(ng-click=click bs-tooltip=tip data-trigger = 'hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-remove(click, tip)
- i.tipField.fa.fa-remove(ng-click=click bs-tooltip=tip data-trigger='hover')
-
-//- LEGACY mixin for LEGACY tables.
-mixin btn-remove-cond(cond, click, tip)
- i.tipField.fa.fa-remove(ng-show=cond ng-click=click bs-tooltip=tip data-trigger='hover')
-
-//- LEGACY mixin for LEGACY pair values tables.
-mixin table-pair-edit(tbl, prefix, keyPlaceholder, valPlaceholder, keyJavaBuiltInTypes, valueJavaBuiltInTypes, focusId, index, divider)
- -var keyModel = tbl + '.' + prefix + 'Key'
- -var valModel = tbl +'.' + prefix + 'Value'
-
- -var keyFocusId = prefix + 'Key' + focusId
- -var valFocusId = prefix + 'Value' + focusId
-
- .col-xs-6.col-sm-6.col-md-6
- .fieldSep !{divider}
- .input-tip
- if keyJavaBuiltInTypes
- input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-escape='tableReset(false)')
- else
- input.form-control(id=keyFocusId ignite-on-enter-focus-move=valFocusId type='text' ng-model=keyModel placeholder=keyPlaceholder ignite-on-escape='tableReset(false)')
- .col-xs-6.col-sm-6.col-md-6
- -var btnVisible = 'tablePairSaveVisible(' + tbl + ', ' + index + ')'
- -var btnSave = 'tablePairSave(tablePairValid, backupItem, ' + tbl + ', ' + index + ')'
- -var btnVisibleAndSave = btnVisible + ' && ' + btnSave
-
- +btn-save(btnVisible, btnSave)
- .input-tip
- if valueJavaBuiltInTypes
- input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder bs-typeahead container='body' ignite-retain-selection data-min-length='1' bs-options='javaClass for javaClass in javaBuiltInClasses' ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
- else
- input.form-control(id=valFocusId type='text' ng-model=valModel placeholder=valPlaceholder ignite-on-enter=btnVisibleAndSave ignite-on-escape='tableReset(false)')
-
-//- Mixin for DB dialect.
-mixin dialect(lbl, model, name, required, tipTitle, genericDialectName, placeholder)
- +dropdown-required(lbl, model, name, 'true', required, placeholder, '[\
- {value: "Generic", label: "' + genericDialectName + '"},\
- {value: "Oracle", label: "Oracle"},\
- {value: "DB2", label: "IBM DB2"},\
- {value: "SQLServer", label: "Microsoft SQL Server"},\
- {value: "MySQL", label: "MySQL"},\
- {value: "PostgreSQL", label: "PostgreSQL"},\
- {value: "H2", label: "H2 database"}\
- ]',
- tipTitle +
- '<ul>\
- <li>' + genericDialectName + '</li>\
- <li>Oracle database</li>\
- <li>IBM DB2</li>\
- <li>Microsoft SQL Server</li>\
- <li>MySQL</li>\
- <li>PostgreSQL</li>\
- <li>H2 database</li>\
- </ul>')
-
-//- Mixin for show/hide links.
-mixin showHideLink(name, text)
- span(ng-init='__ = {};')
- a.customize(ng-show='__.#{name}' ng-click='__.#{name} = false') Hide #{text}
- a.customize(ng-hide='__.#{name}' ng-click='__.#{name} = true; ui.loadPanel("#{name}");') Show #{text}
- div(ng-if='ui.isPanelLoaded("#{name}")')
- .panel-details(ng-show='__.#{name}')
- if block
- block