From 5cdebc461b690e61e3724bdffb971c0104046ed0 Mon Sep 17 00:00:00 2001 From: AliAlaqrabawi2 Date: Tue, 24 Feb 2026 23:09:21 +0300 Subject: [PATCH 1/2] feat/ validate dropbox url --- control/content/index.html | 368 +++++++++++++++++++++---------------- control/content/style.css | 6 + 2 files changed, 217 insertions(+), 157 deletions(-) create mode 100644 control/content/style.css diff --git a/control/content/index.html b/control/content/index.html index a1cd4f4..4499386 100755 --- a/control/content/index.html +++ b/control/content/index.html @@ -1,186 +1,240 @@ - + + - + content - - + + + - -
-
-
- URL to your PDF -
-
-
- + +
+
+
+ URL to your PDF
-
- +
+
+ +
+
+ +
-
-
+
-
-
-
Url - successfully validated +
+
+
+ Url successfully validated +
-
- Invalid Url +
+
Invalid Url
-
-
-
-
-
- - -
+
+
+
+ + +
+
+
+
+
+ Important: +

+ The file must be publicly accessible (anyone with the link can view + it without signing in). +

+

+ If you are using Dropbox, update your shared link to include raw=1 + (for example: https://www.dropbox.com/.../file.pdf?raw=1). +

+

This ensures the app can load the PDF correctly.

+
-
- - + + $scope.validateUrl = function () { + $scope.data.content.url = normalizePdfUrl($scope.data.content.url); + $scope.saveData(); + }; + + $scope.clearUrl = function () { + $scope.data.content.url = undefined; + var data = $scope.data; + buildfire.datastore.save(data, function (err, result) { + if (err || !result) { + $log.error("Error saving the widget details: ", err); + } else { + $log.info("Widget details saved"); + } + }); + }; + + $scope.openMethodChanged = function () { + dataChanged = true; + buildfire.datastore.save($scope.data, function (err, result) { + if (err || !result) { + $log.error("Error saving the widget details: ", err); + } else { + $log.info("Widget details saved"); + } + }); + }; + }, + ]); + - + \ No newline at end of file diff --git a/control/content/style.css b/control/content/style.css new file mode 100644 index 0000000..8660d36 --- /dev/null +++ b/control/content/style.css @@ -0,0 +1,6 @@ +.note { + padding: 12px 35px; + margin-top: 15px; + margin-bottom: 15px; + background: #F5F5F5; +} \ No newline at end of file From bd938f8dd88b0853b5e936dfa57be81048b9d26a Mon Sep 17 00:00:00 2001 From: AliAlaqrabawi2 Date: Tue, 24 Feb 2026 23:12:31 +0300 Subject: [PATCH 2/2] fix indentation --- control/content/index.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/control/content/index.html b/control/content/index.html index 4499386..82d3b9a 100755 --- a/control/content/index.html +++ b/control/content/index.html @@ -1,4 +1,4 @@ - + @@ -72,10 +72,7 @@