Skip to content

Commit 22160b4

Browse files
unknownunknown
authored andcommitted
#5-08-2024
1 parent 294bb53 commit 22160b4

4 files changed

Lines changed: 12 additions & 21 deletions

File tree

appsTeacher/pages/app.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,11 @@ module.exports = function init(site) {
4848
data.user_image = "https://" + req.host + data.user_image;
4949
data.powerdByLogo = "https://" + req.host + data.powerdByLogo;
5050
}
51-
site.pages_list.forEach((page) => {
52-
if (page.url == req.params.url) {
53-
exists = true;
54-
data.page = page;
55-
res.render("pages/page.html", data);
56-
}
57-
});
51+
let page = site.pages_list.find((itm) => itm.url == req.params.url && itm.host == site.getHostFilter(req.host) );
5852

59-
if (!exists) {
60-
res.render("pages/page.html", data);
61-
}
53+
data.page = page;
54+
55+
res.render("pages/page.html", data);
6256
});
6357

6458
site.post("/api/pages/add", (req, res) => {
@@ -75,7 +69,7 @@ module.exports = function init(site) {
7569
_data.$req = req;
7670
_data.$res = res;
7771
_data.host = site.getHostFilter(req.host);
78-
72+
7973
if ((teacherId = site.getTeacherSetting(req))) {
8074
_data.teacherId = teacherId;
8175
}

appsTeacher/pages/site_files/js/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ app.controller("pages", function ($scope, $http, $timeout) {
2222
$scope.error = v.messages[0].ar;
2323
return;
2424
};
25-
if(window.addEditor){
26-
$scope.pages.content = window.addEditor.getContents();
27-
}
25+
2826
$scope.busy = true;
2927
$http({
3028
method: "POST",
@@ -61,7 +59,6 @@ app.controller("pages", function ($scope, $http, $timeout) {
6159
$scope.error = v.messages[0].ar;
6260
return;
6361
}
64-
$scope.pages.content = window.editEditor.getContents();
6562
$scope.busy = true;
6663
$http({
6764
method: "POST",

appsTeacher/teacher-theme/site_files/html/footer.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939

4040
<div class="footerNav">
4141
<ul class="row row-cols-1 row-cols-md-2 row-cols-lg-4">
42-
<li class="col"><a href="/page/inviteFriends" class="hover-a">أدع أصدقاءك</a></li>
43-
<li class="col"><a href="/page/joinUs" class="hover-a">إنضم إلينا</a></li>
42+
<li class="col"><a href="/page/invite-friends" class="hover-a">أدع أصدقاءك</a></li>
43+
<li class="col"><a href="/page/join-us" class="hover-a">إنضم إلينا</a></li>
4444
<!-- <li class="col"><a href="#" class="hover-a">عن المحامي</a></li>
4545
-->
46-
<li class="col"><a href="/page/usageAgreement" class="hover-a">إتفاقية الإستخدام</a></li>
46+
<li class="col"><a href="/page/usage-agreement" class="hover-a">إتفاقية الإستخدام</a></li>
4747
<li class="col"><a href="#" class="hover-a">,</a></li>
48-
<li class="col"><a href="/page/privacyPolicy" class="hover-a">سياسية الخصوصية</a></li>
48+
<li class="col"><a href="/page/privacy-policy" class="hover-a">سياسية الخصوصية</a></li>
4949
</ul>
5050
</div>
5151
<div class="copyright">

site_files/css/teacher-style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ legend {
158158
.gray-bg {
159159
background-color: #ececec !important;
160160
}
161-
i-button {
161+
/* i-button {
162162
display: contents !important;
163-
}
163+
} */
164164
.scrollx-menu {
165165
padding: 10px !important;
166166
overflow-x: auto;

0 commit comments

Comments
 (0)