Added Settings and UI tweaks

Now you can lock the grade page with your password.
still needs some work for unlocking  - there should be a
password prompt
This commit is contained in:
Sagi Dayan 2015-01-13 02:14:24 +02:00
parent 3bcf4e41a6
commit d80c2661a1
11 changed files with 417 additions and 225 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.students.jce.mobile.app" version="0.1.13" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.students.jce.mobile.app" version="0.1.28" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>jceMobile</name>
<description>
Free Your Academic Data

View file

@ -40,4 +40,16 @@ h1{
.page-content{
direction: rtl;
padding: 15px;
}
.settings{
direction: ltr;
}
.menu-tafrit{
direction: rtl;
}

View file

@ -11,13 +11,7 @@ starter.factory('ApiService', ['$http', '$ionicPopup', '$ionicModal', function (
return $http.get(request).then(function(resp) {
if(resp.data.guest == false){
window.localStorage['loggedIn'] = true;
window.localStorage['fullName'] = resp.data.user_fullName;
window.localStorage['email'] = resp.data.user_email;
window.localStorage['phone'] = resp.data.user_phone;
window.localStorage['username'] = username;
window.localStorage['password'] = password;
window.localStorage['userInfo'] = JSON.stringify(resp.data);
console.log("[JCE] [INFO]: Success.");
return true;
}else{
@ -25,7 +19,7 @@ starter.factory('ApiService', ['$http', '$ionicPopup', '$ionicModal', function (
title: 'שם משתמש או סיסמא שגויים',
template: 'וודא שוב כי שם המשתמש והסיסמא הינם נכונים.'
});
console.log("[JCE] [INFO]: Wrong crads.");
console.log("[JCE] [INFO]: Wrong user/pass.");
return false;
}

View file

@ -70,6 +70,26 @@ app.run(function($ionicPlatform) {
}
})
.state('app.aguda', {
url: "/aguda",
views: {
'menuContent': {
templateUrl: "templates/aguda.html",
controller: 'AgudaCtrl'
}
}
})
.state('app.settings', {
url: "/settings",
views: {
'menuContent': {
templateUrl: "templates/settings.html",
controller: 'SettingsCtrl'
}
}
})
.state('app.grades', {
url: "/grades",
views: {

File diff suppressed because one or more lines are too long

23
www/templates/Aouth.html Normal file
View file

@ -0,0 +1,23 @@
<ion-modal-view>
<ion-header-bar>
<h1 class="title">הגיליון נעול</h1>
<div class="buttons">
<button class="button button-clear" ng-click="closeAouth()">סגור</button>
</div>
</ion-header-bar>
<ion-content>
<div class="page-content">
<form ng-submit="Aouth()">
<div class="list">
<label class="item item-input">
<span class="input-label">סיסמה</span>
<input type="password" ng-model="lock.password">
</label>
<label class="item">
<button class="button button-block button-positive" type="submit">לציונים!</button>
</label>
</div>
</form>
</div>
</ion-content>
</ion-modal-view>

91
www/templates/aguda.html Normal file
View file

@ -0,0 +1,91 @@
<ion-view view-title="אגודת הסטודנטים" >
<ion-content>
<div class="page-content">
<h1><i class="icon ion-speakerphone"></i> אגודת הסטודנטים</h1>
<h3><i class="icon ion-android-hand"></i> גרסת פיתוח - הנתונים כאן לא מתעדכנים!</h3>
<div class="list card">
<div class="item item-avatar">
<img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpa1/v/t1.0-1/p200x200/10660171_597727170353519_3762039883805959255_n.jpg?oh=f4f4498e2f3e8fc29eaf046695ce6246&oe=55319C44&__gda__=1429862649_ff1a6a29c78ac73534f8caa69bb921a6">
<h2>פאנג'ויה!</h2>
<p>November 05, 1955</p>
</div>
<div class="item item-body">
<img class="full-image" src="https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xaf1/v/t1.0-9/1898014_629613757164860_1428183927370833321_n.png?oh=3a7d21d83b367c68f8c7af0bf528c93c&oe=55230A4A&__gda__=1428269364_9e26d1101e08635866a2d5168bf13f1d">
<div class="text_exposed_show"><p> את הטפסים יש לשלוח בדיוק בשעה שקיבלתם בהרשמה לתורים.</p><p> *** טפסים להורדה:<br> <a href="http://l.facebook.com/l.php?u=http%3A%2F%2Fwww.funjoya.co.il%2Ffunjoya-form-jr2015.pdf&amp;h=IAQGePLbI&amp;enc=AZNgfLFvrlzZgREmMwCTTN8FYRL6jTPY4DAqatA7mFQcdhVZeZHoVsAloKsbagl_lboUl4amzUgHeSpTm8Mw_Zs3jU-kkuK5NrddVxVRDHVeeUhLqXGKtZSK-8b897RPlAXxp2qXTmnZNWT1oo56ghjMZUkenEWlBJIV9uY2FiL09g&amp;s=1" target="_blank" rel="nofollow" onmouseover="LinkshimAsyncLink.swap(this, &quot;http:\/\/www.funjoya.co.il\/funjoya-form-jr2015.pdf&quot;);" onclick="LinkshimAsyncLink.referrer_log(this, &quot;http:\/\/www.funjoya.co.il\/funjoya-form-jr2015.pdf&quot;, &quot;\/si\/ajax\/l\/render_linkshim_log\/?u=http\u00253A\u00252F\u00252Fwww.funjoya.co.il\u00252Ffunjoya-form-jr2015.pdf&amp;h=IAQGePLbI&amp;render_verification=0&amp;enc=AZNgfLFvrlzZgREmMwCTTN8FYRL6jTPY4DAqatA7mFQcdhVZeZHoVsAloKsbagl_lboUl4amzUgHeSpTm8Mw_Zs3jU-kkuK5NrddVxVRDHVeeUhLqXGKtZSK-8b897RPlAXxp2qXTmnZNWT1oo56ghjMZUkenEWlBJIV9uY2FiL09g&amp;d&quot;);">www.funjoya.co.il/funjoya-form-jr2015.pdf</a></p><p> ***בעת הגשת הטפסים פיזית/בדוא"ל יתבצע אימות לשעה ולתאריך ע"פ מספר תעודת הזהות. סטודנט אשר לא יפעל על פי ההוראות, הזמנתו לא תתקבל.</p></div>
<p>
<a href="#" class="subdued">1 Like</a>
<a href="#" class="subdued">5 Comments</a>
</p>
</div>
<div class="item tabs tabs-secondary tabs-icon-left">
<a class="tab-item" href="#">
<i class="icon ion-thumbsup"></i>
Like
</a>
<a class="tab-item" href="#">
<i class="icon ion-chatbox"></i>
Comment
</a>
<a class="tab-item" href="#">
<i class="icon ion-share"></i>
Share
</a>
</div>
</div>
<!-- ============================= -->
<div class="list card">
<div class="item item-avatar">
<img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpa1/v/t1.0-1/p200x200/10660171_597727170353519_3762039883805959255_n.jpg?oh=f4f4498e2f3e8fc29eaf046695ce6246&oe=55319C44&__gda__=1429862649_ff1a6a29c78ac73534f8caa69bb921a6">
<h2>טורניר שש בש</h2>
<p>November 04, 2014</p>
</div>
<div class="item item-body">
<img class="full-image" src="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xap1/v/t1.0-9/p417x417/10891889_637354646390771_1252827847419502090_n.jpg?oh=b649575085a21b62f4b899415f85b166&oe=553F1956&__gda__=1429216008_06dddb40d81bfb5ef72efe2fd0db2fd6">
הטורניר השנתי ממשיך...
<p>
<a href="#" class="subdued">7 Like</a>
<a href="#" class="subdued">5 Comments</a>
</p>
</div>
<div class="item tabs tabs-secondary tabs-icon-left">
<a class="tab-item" href="#">
<i class="icon ion-thumbsup"></i>
Like
</a>
<a class="tab-item" href="#">
<i class="icon ion-chatbox"></i>
Comment
</a>
<a class="tab-item" href="#">
<i class="icon ion-share"></i>
Share
</a>
</div>
</div>
</div>
</ion-content>
</ion-view>

View file

@ -3,28 +3,6 @@
<div class="page-content">
<h1><i class="icon ion-clipboard"></i> גיליון ציונים</h1>
<!-- <div class="list card" ng-repeat="grade in grades" >
<div class="item">
<h2>{{ grade.subject }}</h2>
<p>{{ grade.credits }} נק"ז</p>
</div>
<div class="item item-body">
{{ grade.final_grade}}
<br> שנה ציון לבדיקת הממוצע: <input type="number" name="quantity" min="55" max="100" ng-bind="grade.final_grade">
</div>
</div> -->
<!-- <div class="list" >
<div class="item item-avatar-right" ng-repeat="grade in grades">
<img ng-src="{{ getMedal(grade.final_grade) }}" alt="">
<h4>{{ grade.subject }}</h4><i>{{ grade.credits }} נק"ז - מועד {{ grade.moed }}</i> : {{ grade.final_grade}}
</div>
</div> -->
<div class="list card" ng-repeat="grade in grades | orderBy:['-year','semester']">
<div class="item item-avatar">

View file

@ -1,25 +0,0 @@
<ion-modal-view>
<ion-header-bar>
<h1 class="title">התחבר</h1>
<div class="buttons">
<button class="button button-clear" ng-click="closeLogin()">סגור</button>
</div>
</ion-header-bar>
<ion-content>
<form ng-submit="doLogin()">
<div class="list">
<label class="item item-input">
<span class="input-label">שם משתמש</span>
<input type="text" ng-model="loginData.username">
</label>
<label class="item item-input">
<span class="input-label">סיסמה</span>
<input type="password" ng-model="loginData.password">
</label>
<label class="item">
<button class="button button-block button-positive" type="submit">התחבר</button>
</label>
</div>
</form>
</ion-content>
</ion-modal-view>

View file

@ -4,48 +4,62 @@
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-buttons side="left">
<button class="button button-icon button-clear ion-navicon" menu-toggle="left">
<ion-nav-buttons side="right">
<button class="button button-icon button-clear ion-navicon" menu-toggle="right" ng-click="menuClicked()">
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view name="menuContent"></ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<ion-side-menu side="right">
<ion-header-bar class="bar-stable bar-dark">
<h1 class="title">תפריט</h1>
</ion-header-bar>
<ion-content>
<div class="menu-tafrit">
<ion-list >
<ion-item nav-clear menu-close ng-click="login()" ng-if="!isLoggedIn()">
<ion-item nav-clear menu-close href="#/app/login" ng-if="!isLoggedIn">
התחבר
</ion-item>
<ion-item nav-clear menu-close href="#/app/home">
עמוד הבית
<ion-item nav-clear menu-close href="#/app/home" ng-if="isLoggedIn">
<i class="icon ion-home"></i> עמוד הבית
</ion-item>
<ion-item nav-clear menu-close href="#/app/playlists">
הודעות אגודת הסטודנטים
<ion-item nav-clear menu-close href="#/app/aguda" ng-if="isLoggedIn">
<i class="icon ion-speakerphone"></i> אגודת הסטודנטים
</ion-item>
<ion-item nav-clear menu-close href="#/app/jcenews" ng-if="isLoggedIn()">
הודעות
<ion-item nav-clear menu-close href="#/app/jcenews" ng-if="isLoggedIn">
<i class="icon ion-paper-airplane"></i> הודעות
</ion-item>
<ion-item nav-clear menu-close href="#/app/grades" ng-if="isLoggedIn()">
גיליון ציונים
<ion-item nav-clear menu-close href="#" ng-click="openGrades()" ng-if="isLoggedIn">
<i class="icon ion-clipboard"></i> גיליון ציונים
</ion-item>
<ion-item nav-clear menu-close href="#/app/playlists" ng-if="isLoggedIn()">
מערכת שעות
<ion-item nav-clear menu-close href="#/app/playlists" ng-if="isLoggedIn">
<i class="icon ion-calendar"></i> מערכת שעות
</ion-item>
<ion-item nav-clear menu-close ng-click="logout()" ng-if="isLoggedIn()">
התנתק
<ion-item nav-clear menu-close href="#/app/settings" ng-if="isLoggedIn">
<i class="icon ion-gear-a"></i> הגדרות
</ion-item>
<ion-item nav-clear menu-close href="#/app/settings" ng-if="isLoggedIn">
<i class="icon ion-power"></i> התנתק
</ion-item>
</ion-list>
<div class="card" ng-if="!isLoggedIn">
<div class="item item-text-wrap">
<p>
עליך להתחבר תחילה על מנת להנות משלל האפשרויות
</p>
</div>
</div>
</div>
</ion-content>
</ion-side-menu>
</ion-side-menus>

View file

@ -0,0 +1,47 @@
<ion-view view-title="הגדרות" >
<ion-content>
<div class="page-content">
<h1><i class="icon ion-gear-a"></i> הגדרות</h1>
<div class="settings">
<ul class="list">
<li class="item item-toggle item-left" ng-repeat="setting in settings">
{{ setting.text }}
<label class="toggle toggle-assertive">
<input type="checkbox" ng-model="setting.val" ng-click="toggled()">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
</ul>
</div>
<h1><i class="icon ion-information-circled"></i> אודות</h1>
<div class="list card">
<div class="item item-avatar">
<img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpa1/v/t1.0-1/c16.0.64.64/p64x64/1898249_10152059274973813_1153483747_n.jpg?oh=a3836094e541464767bf5f623c7d5ce1&oe=552EAFC8&__gda__=1429284441_35e1b5c5b693fb41e8a5d79935c57496">
<h2>שגיא דיין</h2>
<p>מפתח ראשי</p>
</div>
<div class="item item-body">
<!-- <img class="full-image" src="delorean.jpg"> -->
<p>
התוכנה נוצרה למען הסטודנטים.
</p>
<p>
כל הקוד זמין בgithub <i class="icon ion-social-github"></i> - וכך גם הוראות הבניה והקימפול.
<br>הרישיון של תוכנה זו היא כדלקמן: "עשה מה שבא לך - לא מעניין אותי"
</p>
</div>
</div>
</ion-content>
</ion-view>