Skip to content

Commit

Permalink
Merge pull request #247 from TAMULib/operations-sprint3-staging
Browse files Browse the repository at this point in the history
Operations Sprint 3
  • Loading branch information
wwelling authored Jul 11, 2024
2 parents 0af49fd + 5b19944 commit ca1e36f
Show file tree
Hide file tree
Showing 20 changed files with 213 additions and 199 deletions.
20 changes: 0 additions & 20 deletions .wvr/build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,6 @@ const config = {
from: './node_modules/bootstrap/dist/css/bootstrap.min.css.map',
to: './resources/styles/bootstrap/dist/css/bootstrap.min.css.map',
},
{
from: './node_modules/tinymce/plugins/**/plugin.js',
to({ context, absoluteFilename }) {
return `${absoluteFilename.replace(/^.*\/node_modules\/tinymce\/plugins\//, "plugins/")}`;
},
},
{
from: './node_modules/tinymce/themes/**/theme.js',
to({ context, absoluteFilename }) {
return `${absoluteFilename.replace(/^.*\/node_modules\/tinymce\/themes\//, "themes/")}`;
},
},
{
from: './node_modules/tinymce/skins/**/*.css',
to({ context, absoluteFilename }) {
return `${absoluteFilename.replace(/^.*\/node_modules\/tinymce\/skins\//, "skins/")}`;
},
},
],
entry: {
app: [
Expand All @@ -104,8 +86,6 @@ const config = {
'./node_modules/ng-file-upload/dist/ng-file-upload-shim.js',
'./node_modules/ng-file-upload/dist/ng-file-upload.js',
'./node_modules/ng-table/bundles/ng-table.js',
'./node_modules/tinymce/tinymce.js',
'./node_modules/angular-ui-tinymce/dist/tinymce.min.js',
'./node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js',
'./node_modules/@wvr/core/app/config/coreConfig.js',
'./node_modules/@wvr/core/app/components/version/version.js',
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog

## [1.5.3] - 07-10-24
### Resolves

- Unable to update the body of a notification in the Status application.. (#245)

## [1.5.2] - 04-08-24
### Resolves

- Github Actions for LibraryServiceStatusSystem UI. (#185)
- WYSIWYG forces relative links. (#216)
- Upgrade Weaver-UI-Core (2.2.2-rc.8). (#212)
- Tech debt tasks. (#219)
- Tech debt tasks. (#221)
- Weaver upgrade. (#223)
- Source maps fail to load. (#226)
- Coverage report not being sent to coveralls. (#224)
- Footer not sticky on bottom. (#225)
- Upgrade to latest tl_components. (#6)
- Added Lato font and rem rule. (#231)
- Update Dockerfile. (#232)
- Update Dockerfile using node 16 in #233
- Allow anonymous viewing of Status app. (#240)
- Security fixes for: minimatch and qs. (#234)
- Improve handling of local Weaver-UI-Core repo, adding support for det… in #237
- Enforce line-feed/new-line character as the only EOL for certain line-ending sensitive script files. (#239)

2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ setUpApp(function (connected) {

try {
//If the app is already bootstrapped then an error will be thrown
angular.bootstrap(document, ['app', 'core', 'ngMessages', 'ngFileUpload', 'ui.tinymce', 'ui.bootstrap']);
angular.bootstrap(document, ['app', 'core', 'ngMessages', 'ngFileUpload', 'ui.bootstrap']);

if (!window.stompClient.connected) {
unreachableAlert(injector);
Expand Down
2 changes: 1 addition & 1 deletion app/config/runTime.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app.run(function ($location) {

angular.element("body").fadeIn(300);
angular.element("body").css('opacity', 0).animate({ opacity: 1 }, 1000);
// Add runtime tasks here

// Allow the passing of an additional parameter which
Expand Down
7 changes: 0 additions & 7 deletions app/controllers/ideaController.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,4 @@ app.controller('IdeaController', function ($controller, $scope, FeatureProposalR
$scope.selectedFp = fp;
};

$scope.tinymceOptions = {
selector: 'textarea',
theme: "modern",
plugins: "link lists",
toolbar: "undo redo | formatselect bold italic separator | alignleft aligncenter alignright | numlist bullist | forecolor backcolor"
};

});
53 changes: 31 additions & 22 deletions app/controllers/noteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ app.controller('NoteController', function ($controller, $scope, Note, NoteRepo,

$scope.forms = {};

$scope.noteToDelete = {};
var emptyNote = {
title: '',
active: false,
pinned: false,
service: $scope.services[0],
noteType: 'ENHANCEMENT'
};

$scope.noteToDelete = new Note(emptyNote);

$scope.noteData = new Note(emptyNote);

$scope.noteTypes = [{
value: "ENHANCEMENT",
Expand Down Expand Up @@ -108,23 +118,16 @@ app.controller('NoteController', function ($controller, $scope, Note, NoteRepo,
ServiceRepo.ready().then(function () {

$scope.resetNotes = function () {
if ($scope.noteData) {
$scope.noteData.refresh();
$scope.noteData.clearValidationResults();
}
$scope.noteData.refresh();
$scope.noteData.clearValidationResults();

for (var key in $scope.forms) {
if (!$scope.forms[key].$pristine) {
$scope.forms[key].$setPristine();
$scope.forms[key].$setUntouched();
}
}
$scope.noteData = new Note({
title: '',
active: false,
pinned: false,
service: $scope.services[0],
noteType: 'ENHANCEMENT'
});
Object.assign($scope.noteData, emptyNote);
$scope.closeModal();
};

Expand All @@ -139,8 +142,15 @@ app.controller('NoteController', function ($controller, $scope, Note, NoteRepo,
};

$scope.editNote = function (note) {
$scope.noteData = note;
Object.assign($scope.noteData, note);
$scope.openModal('#editNoteModal');
var modal = angular.element('#editNoteModal');
if (modal) {
var iframe = modal.find("iframe");
if (iframe && iframe.length >= 1) {
iframe[0].contentDocument.body.innerHTML = note.body;
}
}
};

$scope.updateNote = function () {
Expand All @@ -162,8 +172,8 @@ app.controller('NoteController', function ($controller, $scope, Note, NoteRepo,
};

$scope.confirmDelete = function (note) {
Object.assign($scope.noteToDelete, note);
$scope.openModal('#deleteNoteModal');
$scope.noteToDelete = note;
};

$scope.deleteNote = function () {
Expand All @@ -172,18 +182,17 @@ app.controller('NoteController', function ($controller, $scope, Note, NoteRepo,
if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
$scope.closeModal();
$scope.deleting = false;
$scope.noteToDelete = {};
Object.assign($scope.noteToDelete, emptyNote);
}
});
};

});
document.addEventListener("contentSave", function (e) {
$scope.noteData.body = encodeURIComponent(e.detail.data);
$scope.noteData.update($scope.noteData);
$scope.noteData.body = decodeURIComponent($scope.noteData.body);
});

$scope.tinymceOptions = {
selector: 'textarea',
theme: "modern",
plugins: "link lists",
toolbar: "undo redo | formatselect bold italic separator | alignleft aligncenter alignright | numlist bullist | forecolor backcolor"
};
});

});
55 changes: 31 additions & 24 deletions app/controllers/notificationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,27 @@ app.controller('NotificationController', function ($controller, $scope, Notifica

$scope.forms = {};

$scope.notificationToDelete = {};
var emptyNotification = {
name: '',
body: '',
active: false,
locations: []
};

$scope.notificationToDelete = new Notification(emptyNotification);

$scope.notificationData = new Notification(emptyNotification);

$scope.resetNotifications = function () {
if ($scope.notificationData) {
$scope.notificationData.refresh();
$scope.notificationData.clearValidationResults();
}
$scope.notificationData.refresh();
$scope.notificationData.clearValidationResults();

for (var key in $scope.forms) {
if (!$scope.forms[key].$pristine) {
$scope.forms[key].$setPristine();
}
}
$scope.notificationData = new Notification({
name: '',
body: '',
active: false,
locations: []
});
Object.assign($scope.notificationData, emptyNotification);
$scope.closeModal();
};

Expand All @@ -59,8 +62,15 @@ app.controller('NotificationController', function ($controller, $scope, Notifica
};

$scope.editNotification = function (notification) {
$scope.notificationData = notification;
Object.assign($scope.notificationData, notification);
$scope.openModal('#editNotificationModal');
var modal = angular.element('#editNotificationModal');
if (modal) {
var iframe = modal.find("iframe");
if (iframe && iframe.length >= 1) {
iframe[0].contentDocument.body.innerHTML = notification.body;
}
}
};

$scope.updateNotification = function () {
Expand All @@ -73,8 +83,8 @@ app.controller('NotificationController', function ($controller, $scope, Notifica
};

$scope.confirmDelete = function (notification) {
Object.assign($scope.notificationToDelete, notification);
$scope.openModal('#deleteNotificationModal');
$scope.notificationToDelete = notification;
};

$scope.deleteNotification = function () {
Expand All @@ -83,7 +93,7 @@ app.controller('NotificationController', function ($controller, $scope, Notifica
if (angular.fromJson(res.body).meta.status === 'SUCCESS') {
$scope.closeModal();
$scope.deleting = false;
$scope.notificationToDelete = {};
Object.assign($scope.notificationToDelete, emptyNotification);
$scope.tableParams.reload();
}
});
Expand Down Expand Up @@ -111,17 +121,14 @@ app.controller('NotificationController', function ($controller, $scope, Notifica

NotificationRepo.ready().then(function () {
buildTable();

document.addEventListener("contentSave", function (e) {
$scope.notificationData.body = encodeURIComponent(e.detail.data);
$scope.notificationData.update($scope.notificationData);
$scope.notificationData.body = decodeURIComponent($scope.notificationData.body);
});

$scope.tableParams.reload();
});

$scope.tinymceOptions = {
selector: 'textarea',
theme: "modern",
plugins: "link lists",
toolbar: "undo redo | formatselect bold italic separator | alignleft aligncenter alignright | numlist bullist | forecolor backcolor",
relative_urls: false,
remove_script_host : false,
convert_urls : true
};

});
Loading

0 comments on commit ca1e36f

Please sign in to comment.