Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sencha-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
sencha-core
Commits
3f5dbaab
Commit
3f5dbaab
authored
Mar 23, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added reportMesssage for non-fatal error messages
parent
0ed5db4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
Utilities.adp
www/Utilities.adp
+35
-0
No files found.
www/Utilities.adp
View file @
3f5dbaab
...
...
@@ -82,6 +82,41 @@ Ext.define('PO.Utilities', {
msgBox.setOverflowXY('auto', 'auto');
},
/**
* Write out a message
*/
reportMessage : function(title, msg) {
var me = this;
// Split lines with length > maxLen into multiple lines
var maxLen = 75;
var msgLimited = "";
var msgLines = msg.split("\n");
for (var i = 0; i < msgLines.length; i++) {
var line = msgLines[i];
while (line.length > maxLen) {
msgLimited = msgLimited + line.substr(0,maxLen) + "\n";
line = line.substr(maxLen);
}
msgLimited = msgLimited + line + "\n";
}
var msgBox = Ext.create('Ext.window.MessageBox', { });
msgBox.show({
title: title,
msg: msgLimited,
minWidth: 600,
buttonText: { yes: "OK" },
icon: Ext.Msg.OK,
fn: function(text) { }
});
msgBox.setOverflowXY('auto', 'auto');
},
/**
* Handle errors while trying to load a store
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment