Index: components/artifactView/js/ArtifactView.js
===================================================================
--- components/artifactView/js/ArtifactView.js (revision 9768)
+++ components/artifactView/js/ArtifactView.js (working copy)
@@ -173,11 +173,18 @@
that.refreshView();
};
- var updateSectionHeader = function (that, cabinetSelector, newSectionHeaderText) {
- var section = that.sections[that.locate("sections", that.options.selectors.sectionContainer).index(cabinetSelector)];
- that.locate("sectionHeader", cabinetSelector)
- .text(fluid.stringTemplate(that.options.strings[section[newSectionHeaderText]],
- {size: section.sectionSize}));
+ var updateSectionHeader = function (that, model) {
+ var index = 0;
+ $.each(model, function (id, status) {
+ var header = that.locate("sectionHeader", "#" + id),
+ section = that.sections[index],
+ newHeader = fluid.stringTemplate(that.options.strings[section[status === "open" ?
+ "sectionTitleOpenKey" : "sectionTitleKey"]], {size: section.sectionSize});
+ if (header.text() !== newHeader) {
+ header.text(newHeader);
+ }
+ index++;
+ });
};
var setupSubcomponents = function (that) {
@@ -198,11 +205,8 @@
if (that.sections.length > 0 && that.options.useCabinet) {
that.cabinet = fluid.initSubcomponent(that, "cabinet", [that.locate("sectionContainer"), fluid.COMPONENT_OPTIONS]);
- that.cabinet.events.afterOpen.addListener(function (cabinetSelector) {
- updateSectionHeader(that, cabinetSelector, "sectionTitleOpenKey");
- });
- that.cabinet.events.afterClose.addListener(function (cabinetSelector) {
- updateSectionHeader(that, cabinetSelector, "sectionTitleKey");
+ that.cabinet.events.afterModelChanged.addListener(function (model) {
+ updateSectionHeader(that, model);
});
}
// Note current deficient, time-dependent and awkward strategy based on rebuilding components on re-render, awaiting
Index: components/cabinet/html/Cabinet.html
===================================================================
--- components/cabinet/html/Cabinet.html (revision 9768)
+++ components/cabinet/html/Cabinet.html (working copy)
@@ -14,7 +14,7 @@
-
+
Index: components/myCollection/css/myCollection.css
===================================================================
--- components/myCollection/css/myCollection.css (revision 9768)
+++ components/myCollection/css/myCollection.css (working copy)
@@ -46,6 +46,10 @@
margin: auto;
}
+.fl-myCollection-dialogContainer {
+ overflow: hidden;
+}
+
.fl-myCollection-sendMailDialog {
display: none;
padding: 55px 10px 0 10px;
@@ -59,7 +63,7 @@
float:right
}
-.ui-state-default {
+.ui-dialog-buttonpane button {
font-size: 14px;
-webkit-border-bottom-left-radius: 10px 10px;
-webkit-border-bottom-right-radius: 10px 10px;
@@ -99,7 +103,7 @@
.fl-theme-engageMobile .fl-myCollection-sendMailDialog {
color: white;
}
-.fl-theme-engageMobile .ui-state-default {
+.fl-theme-engageMobile .ui-dialog-buttonpane button {
color: #4D4D4D;
background: #F5F5F5;
border-color: rgba(62, 62, 62, 0.9);
Index: components/myCollection/html/myCollection.html
===================================================================
--- components/myCollection/html/myCollection.html (revision 9768)
+++ components/myCollection/html/myCollection.html (working copy)
@@ -18,8 +18,10 @@
-
-
+
+
+
+
Index: components/myCollection/js/MyCollectionView.js
===================================================================
--- components/myCollection/js/MyCollectionView.js (revision 9768)
+++ components/myCollection/js/MyCollectionView.js (working copy)
@@ -128,7 +128,6 @@
modal: false,
position: ["center", "top"],
width: 320,
- minHeight: 200,
dialogClass: that.options.styles.dialogClass,
buttons: {},
closeText: "",
Index: tests/component-tests/browse/html/Browse-test.html
===================================================================
--- tests/component-tests/browse/html/Browse-test.html (revision 9768)
+++ tests/component-tests/browse/html/Browse-test.html (working copy)
@@ -9,7 +9,7 @@
-
+
Index: tests/component-tests/cabinet/html/Cabinet-test.html
===================================================================
--- tests/component-tests/cabinet/html/Cabinet-test.html (revision 9768)
+++ tests/component-tests/cabinet/html/Cabinet-test.html (working copy)
@@ -9,7 +9,7 @@
-
+
Index: tests/component-tests/myCollection/html/myCollectionView-test.html
===================================================================
--- tests/component-tests/myCollection/html/myCollectionView-test.html (revision 9768)
+++ tests/component-tests/myCollection/html/myCollectionView-test.html (working copy)
@@ -11,8 +11,10 @@
-
-
+
+
+
+
Index: tests/component-tests/myCollection/js/myCollectionTests.js
===================================================================
--- tests/component-tests/myCollection/js/myCollectionTests.js (revision 9768)
+++ tests/component-tests/myCollection/js/myCollectionTests.js (working copy)
@@ -15,7 +15,7 @@
(function ($) {
$(document).ready(function () {
var tests = {};
- var model = [];
+ var options = [];
var component;
var setup = function () {
@@ -34,25 +34,23 @@
$.ajax({
url: url,
success: function (returnedData) {
- model = JSON.parse(returnedData);
- },
+ options = JSON.parse(returnedData);
+ },
async: false
});
- component = fluid.engage.myCollection(".flc-myCollection-container", {
- navigationList: {
- type: "fluid.navigationList",
- options: {
- listeners: {
- afterRender: function () {
- start();
+ component = fluid.engage.myCollection(".flc-myCollection-container",
+ $.extend(true, {
+ navigationList: {
+ type: "fluid.navigationList",
+ options: {
+ listeners: {
+ afterRender: function () {
+ start();
+ }
}
}
- }
- },
- model: model
- });
-
+ }}, options));
// Here we delay the running of the tests to allow the My Collection component
// to be initialized. This is necessary because its initialization is delayed.
stop();
@@ -84,11 +82,11 @@
expect(3);
jqUnit.assertEquals("Model length matches data length.",
- model.length, component.model.length);
+ options.model.length, component.model.length);
jqUnit.assertEquals("Model node artifact ID matches passed ID.",
- model[0].id, component.model[0].id);
+ options.model[0].id, component.model[0].id);
jqUnit.assertEquals("Model node museum matches passed museum.",
- model[0].museum, component.model[0].museum);
+ options.model[0].museum, component.model[0].museum);
});
};
Index: tests/framework-tests/dates/html/Date-test.html
===================================================================
--- tests/framework-tests/dates/html/Date-test.html (revision 9768)
+++ tests/framework-tests/dates/html/Date-test.html (working copy)
@@ -7,7 +7,7 @@
-
+
Index: tests/framework-tests/engageClientUtils/html/EngageClientUtils-test.html
===================================================================
--- tests/framework-tests/engageClientUtils/html/EngageClientUtils-test.html (revision 9768)
+++ tests/framework-tests/engageClientUtils/html/EngageClientUtils-test.html (working copy)
@@ -7,7 +7,7 @@
-
+