Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/assets/groups.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"_hidden_node": {
"jqm_toolbars":["Header", "Footer", "Navbar"],
"jqm_toolbars":["Header", "CustomHeader", "Footer", "Navbar"],
"jqm_input_boolean":["ToggleSwitch", "RadioButton", "RadioGroup", "Checkbox", "CheckboxGroup"],
"jqm_other_inputs":[ {
"Form": ["Form"],
Expand Down
23 changes: 23 additions & 0 deletions src/css/images/widgets/jqm_customheader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/js/composer.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ $(function() {
// Collapsible's items are under .ui-collapsible-content
'> .ui-collapsible-content > .adm-node,' +
'> ul > li.adm-node,' +
'> div > .adm-node,' +
'> *.orig-adm-node:not(.ui-header,.ui-content,.ui-footer)',
start: function(event, ui){
trackOffsets('start: ',ui,$(this).data('sortable'));
Expand Down
32 changes: 31 additions & 1 deletion src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ var BWidgetRegistry = {
{
name: "top",
cardinality: "1",
allow: "Header"
allow: ["Header", "CustomHeader"]
},
{
name: "content",
Expand Down Expand Up @@ -389,6 +389,36 @@ var BWidgetRegistry = {
]
},

/**
* Represents a header object at the top of a page. Includes a "text"
* property that represents header text. Includes "left" and "right" zones
* for optional buttons, and "bottom" zone for an optional navbar.
*/
CustomHeader: {
parent: "Background",
allowIn: "Page",
dragHeader: true,
paletteImageName: "jqm_customheader.svg",
displayLabel: "Custom Header",
moveable: false,
template: '<div data-role="header"><div></div></div>',
properties: {
text: {
type: "string",
defaultValue: "CustomHeader"
},
position: BCommonProperties.position,
theme: BCommonProperties.theme
},
zones: [
{
name: "default",
locator: '> div',
cardinality: "N"
}
]
},

/**
* Represents a footer object at the bottom of a page.
*/
Expand Down