mirror of
https://github.com/sismics/docs.git
synced 2024-12-23 11:43:49 +01:00
commit
87b3d25c0f
@ -101,15 +101,15 @@
|
|||||||
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="fab-0.0.6" level="project" />
|
<orderEntry type="library" exported="" name="fab-0.0.6" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="android-easing-1.0.3" level="project" />
|
<orderEntry type="library" exported="" name="android-easing-1.0.3" level="project" />
|
||||||
<orderEntry type="library" exported="" name="imagezoom-1.0.5" level="project" />
|
<orderEntry type="library" exported="" name="imagezoom-1.0.5" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="eventbus-2.4.0" level="project" />
|
<orderEntry type="library" exported="" name="eventbus-2.4.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="android-query.0.26.8" level="project" />
|
<orderEntry type="library" exported="" name="android-query.0.26.8" level="project" />
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="tokenautocomplete-1.2.1" level="project" />
|
<orderEntry type="library" exported="" name="tokenautocomplete-1.2.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-v4-22.1.0" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-annotations-22.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="recyclerview-v7-22.0.0" level="project" />
|
<orderEntry type="library" exported="" name="recyclerview-v7-22.0.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="android-async-http-1.4.6" level="project" />
|
<orderEntry type="library" exported="" name="android-async-http-1.4.6" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="appcompat-v7-22.1.0" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
@ -35,7 +35,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: '*.jar')
|
compile fileTree(dir: 'libs', include: '*.jar')
|
||||||
compile 'com.android.support:appcompat-v7:22.0.0'
|
compile 'com.android.support:appcompat-v7:22.1.0'
|
||||||
compile 'com.android.support:recyclerview-v7:22.0.0'
|
compile 'com.android.support:recyclerview-v7:22.0.0'
|
||||||
compile 'com.loopj.android:android-async-http:1.4.6'
|
compile 'com.loopj.android:android-async-http:1.4.6'
|
||||||
compile 'it.sephiroth.android.library.imagezoom:imagezoom:1.0.5'
|
compile 'it.sephiroth.android.library.imagezoom:imagezoom:1.0.5'
|
||||||
|
@ -3,7 +3,7 @@ package com.sismics.docs.activity;
|
|||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
@ -43,7 +43,7 @@ import de.greenrobot.event.EventBus;
|
|||||||
*
|
*
|
||||||
* @author bgamard.
|
* @author bgamard.
|
||||||
*/
|
*/
|
||||||
public class DocumentEditActivity extends ActionBarActivity {
|
public class DocumentEditActivity extends AppCompatActivity {
|
||||||
/**
|
/**
|
||||||
* Document edited.
|
* Document edited.
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +13,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
@ -57,7 +57,7 @@ import de.greenrobot.event.EventBus;
|
|||||||
*
|
*
|
||||||
* @author bgamard
|
* @author bgamard
|
||||||
*/
|
*/
|
||||||
public class DocumentViewActivity extends ActionBarActivity {
|
public class DocumentViewActivity extends AppCompatActivity {
|
||||||
/**
|
/**
|
||||||
* Request code of adding file.
|
* Request code of adding file.
|
||||||
*/
|
*/
|
||||||
@ -116,8 +116,10 @@ public class DocumentViewActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
// Setup the activity
|
// Setup the activity
|
||||||
setContentView(R.layout.document_view_activity);
|
setContentView(R.layout.document_view_activity);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
if (getSupportActionBar() != null) {
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Fill the view
|
// Fill the view
|
||||||
refreshDocument(document);
|
refreshDocument(document);
|
||||||
|
@ -3,7 +3,7 @@ package com.sismics.docs.activity;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -30,7 +30,7 @@ import org.json.JSONObject;
|
|||||||
*
|
*
|
||||||
* @author bgamard
|
* @author bgamard
|
||||||
*/
|
*/
|
||||||
public class LoginActivity extends ActionBarActivity {
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User interface.
|
* User interface.
|
||||||
|
@ -7,8 +7,8 @@ import android.content.res.Configuration;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.SearchRecentSuggestions;
|
import android.provider.SearchRecentSuggestions;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
@ -39,7 +39,8 @@ import de.greenrobot.event.EventBus;
|
|||||||
*
|
*
|
||||||
* @author bgamard
|
* @author bgamard
|
||||||
*/
|
*/
|
||||||
public class MainActivity extends ActionBarActivity {
|
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private ActionBarDrawerToggle drawerToggle;
|
private ActionBarDrawerToggle drawerToggle;
|
||||||
private MenuItem searchItem;
|
private MenuItem searchItem;
|
||||||
@ -61,8 +62,10 @@ public class MainActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
// Enable ActionBar app icon to behave as action to toggle nav drawer
|
// Enable ActionBar app icon to behave as action to toggle nav drawer
|
||||||
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
if (getSupportActionBar() != null) {
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
// ActionBarDrawerToggle ties together the the proper interactions
|
// ActionBarDrawerToggle ties together the the proper interactions
|
||||||
// between the sliding drawer and the action bar app icon
|
// between the sliding drawer and the action bar app icon
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.sismics.docs.activity;
|
package com.sismics.docs.activity;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
|
||||||
import com.sismics.docs.fragment.SettingsFragment;
|
import com.sismics.docs.fragment.SettingsFragment;
|
||||||
@ -11,14 +11,16 @@ import com.sismics.docs.fragment.SettingsFragment;
|
|||||||
*
|
*
|
||||||
* @author bgamard.
|
* @author bgamard.
|
||||||
*/
|
*/
|
||||||
public class SettingsActivity extends ActionBarActivity {
|
public class SettingsActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
if (getSupportActionBar() != null) {
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Display the fragment as the main content.
|
// Display the fragment as the main content.
|
||||||
getFragmentManager().beginTransaction()
|
getFragmentManager().beginTransaction()
|
||||||
|
@ -48,6 +48,11 @@ public class FileCreatedAsyncListener {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
FileDao fileDao = new FileDao();
|
FileDao fileDao = new FileDao();
|
||||||
|
if (fileDao.getById(file.getId()) == null) {
|
||||||
|
// The file has been deleted since the OCR-ization started, ignore the result
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
file.setContent(content);
|
file.setContent(content);
|
||||||
fileDao.update(file);
|
fileDao.update(file);
|
||||||
}
|
}
|
||||||
|
@ -95,20 +95,6 @@ angular.module('docs').controller('Document', function($scope, $timeout, $state,
|
|||||||
$scope.loadDocuments();
|
$scope.loadDocuments();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Go to add document form.
|
|
||||||
*/
|
|
||||||
$scope.addDocument = function() {
|
|
||||||
$state.transitionTo('document.add');
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Go to edit document form.
|
|
||||||
*/
|
|
||||||
$scope.editDocument = function(id) {
|
|
||||||
$state.transitionTo('document.edit', { id: id });
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a document.
|
* Display a document.
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="well">
|
<div class="well">
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<button class="btn btn-primary" type="button" ng-click="addDocument()"><span class="glyphicon glyphicon-plus"></span> Add a document</button>
|
<a href="#/document/add" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Add a document</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@ -34,7 +34,11 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-click="viewDocument(document.id)" ng-repeat="document in documents">
|
<tr ng-click="viewDocument(document.id)" ng-repeat="document in documents">
|
||||||
<td>{{ document.title }} ({{ document.file_count }}) <span class="glyphicon glyphicon-share" ng-if="document.shared" tooltip="Shared"></span></td>
|
<td>
|
||||||
|
{{ document.title }} ({{ document.file_count }})
|
||||||
|
<span class="glyphicon glyphicon-share" ng-if="document.shared" tooltip="Shared"></span>
|
||||||
|
<a href="#/document/view/{{ document.id }}" ng-click="$event.stopPropagation()"><span class="glyphicon glyphicon-link"></span></a>
|
||||||
|
</td>
|
||||||
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
|
<td>{{ document.create_date | date: 'yyyy-MM-dd' }}</td>
|
||||||
<td class="hidden-xs cell-tags">
|
<td class="hidden-xs cell-tags">
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
@ -48,7 +52,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="text-center pagination-box">
|
<div class="text-center pagination-box">
|
||||||
<pagination total-items="totalDocuments" max-size="5" page="currentPage"></pagination>
|
<pagination total-items="totalDocuments" items-per-page="limit" max-size="5" page="currentPage"></pagination>
|
||||||
<label class="sr-only" for="pagesizeSelect">Page size</label>
|
<label class="sr-only" for="pagesizeSelect">Page size</label>
|
||||||
<select ng-model="limit" id="pagesizeSelect" class="form-control">
|
<select ng-model="limit" id="pagesizeSelect" class="form-control">
|
||||||
<option value="10">10 per page</option>
|
<option value="10">10 per page</option>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="glyphicon glyphicon-trash"></span> Delete</button>
|
<button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="glyphicon glyphicon-trash"></span> Delete</button>
|
||||||
<button class="btn btn-primary" ng-click="editDocument(document.id)"><span class="glyphicon glyphicon-pencil"></span> Edit</button>
|
<a href="#/document/edit/{{ document.id }}" class="btn btn-primary"><span class="glyphicon glyphicon-pencil"></span> Edit</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user