Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
02651fa3
Commit
02651fa3
authored
11 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SP-782 BIS-497 iPad Bug 3 and search results feedback improved.
SVN: 29576
parent
d056c071
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m
+26
-13
26 additions, 13 deletions
.../source/objc/openBIS/openBIS/CISDOBMasterViewController.m
with
26 additions
and
13 deletions
openbis-ipad/source/objc/openBIS/openBIS/CISDOBMasterViewController.m
+
26
−
13
View file @
02651fa3
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
-
(
void
)
showActivityIndicatorOnView
:(
UIView
*
)
view
-
(
void
)
showActivityIndicatorOnView
:(
UIView
*
)
view
{
{
self
.
activityIndicator
.
center
=
view
.
center
;
self
.
activityIndicator
.
center
=
CGPointMake
(
view
.
center
.
x
,
view
.
center
.
y
-
242
-
90
)
;
[
self
.
activityIndicator
startAnimating
];
[
self
.
activityIndicator
startAnimating
];
[
view
addSubview
:
self
.
activityIndicator
];
[
view
addSubview
:
self
.
activityIndicator
];
}
}
...
@@ -328,30 +328,39 @@
...
@@ -328,30 +328,39 @@
-
(
BOOL
)
searchDisplayController
:(
UISearchDisplayController
*
)
controller
shouldReloadTableForSearchScope
:(
NSInteger
)
searchOption
-
(
BOOL
)
searchDisplayController
:(
UISearchDisplayController
*
)
controller
shouldReloadTableForSearchScope
:(
NSInteger
)
searchOption
{
{
CISDOBTableDisplayState
*
oldDisplayState
=
self
.
searchFilterState
;
//
BUGFIX
-
Avoid
application
crash
self
.
openBisModel
.
selectedSearchScopeIndex
=
searchOption
;
if
(
self
.
openBisModel
.
searchString
==
nil
)
{
NSString
*
searchTitle
=
[
self
scopeButtonTitles
][
self
.
openBisModel
.
selectedSearchScopeIndex
];
self
.
searchFilterState
=
[
self
.
openBisModel
isSelectedSearchScopeIndexSearch
]
?
self
.
searchState
:
self
.
filterState
;
if
(
self
.
openBisModel
.
searchString
==
nil
)
{
//
Avoid
application
crash
self
.
openBisModel
.
searchString
=
@
""
;
self
.
openBisModel
.
searchString
=
@
""
;
}
}
//
BUGFIX
//
Updating
the
state
controller
if
the
user
presses
a
scope
buttion
self
.
openBisModel
.
selectedSearchScopeIndex
=
searchOption
;
self
.
searchFilterState
=
[
self
.
openBisModel
isSelectedSearchScopeIndexSearch
]
?
self
.
searchState
:
self
.
filterState
;
//
Searching
for
barcodes
or
normal
search
NSString
*
searchTitle
=
[
self
scopeButtonTitles
][
searchOption
];
if
([
searchTitle
isEqualToString
:
@
"Barcode"
])
{
if
([
searchTitle
isEqualToString
:
@
"Barcode"
])
{
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@
"MainStoryboard_iPad"
bundle
:
nil
];
UIStoryboard
*
storyboard
=
[
UIStoryboard
storyboardWithName
:
@
"MainStoryboard_iPad"
bundle
:
nil
];
CISDOBBarcodeViewController
*
barcodeController
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@
"Barcode"
];
CISDOBBarcodeViewController
*
barcodeController
=
[
storyboard
instantiateViewControllerWithIdentifier
:
@
"Barcode"
];
barcodeController
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
barcodeController
.
modalPresentationStyle
=
UIModalPresentationFullScreen
;
[
self
presentModalViewController
:
barcodeController
animated
:
YES
];
[
self
presentModalViewController
:
barcodeController
animated
:
YES
];
return
NO
;
return
NO
;
}
else
{
//
Search
String
should
have
a
minimum
size
}
else
{
return
(
oldDisplayState
!
=
self
.
searchFilterState
)
?
return
[
self
.
searchFilterState
searchDisplayController
:
controller
shouldReloadTableForSearchString
:
self
.
openBisModel
.
searchString
];
[
self
.
searchFilterState
searchDisplayController
:
controller
shouldReloadTableForSearchString
:
self
.
openBisModel
.
searchString
]
:
YES
;
}
}
}
}
-
(
void
)
searchDisplayControllerWillBeginSearch
:(
UISearchDisplayController
*
)
controller
-
(
void
)
searchDisplayControllerWillBeginSearch
:(
UISearchDisplayController
*
)
controller
{
{
//
BUGFIX
-
Avoid
inconsistent
selected
button
when
moving
through
sections
that
change
the
state
if
([
self
.
searchFilterState
class
]
==
[
CISDOBTableSearchState
class
])
{
controller
.
searchBar
.
selectedScopeButtonIndex
=
0
;
}
else
if
([
self
.
searchFilterState
class
]
==
[
CISDOBTableFilterState
class
])
{
controller
.
searchBar
.
selectedScopeButtonIndex
=
[
self
scopeButtonTitles
]
.
count
-
1
;
}
//
BUGFIX
controller
.
searchBar
.
scopeButtonTitles
=
[
self
scopeButtonTitles
];
controller
.
searchBar
.
scopeButtonTitles
=
[
self
scopeButtonTitles
];
controller
.
searchBar
.
showsScopeBar
=
YES
;
controller
.
searchBar
.
showsScopeBar
=
YES
;
}
}
...
@@ -594,9 +603,13 @@ static NSTimer *timer = nil;
...
@@ -594,9 +603,13 @@ static NSTimer *timer = nil;
[
invocation
setArgument
:
&
searchString
atIndex
:
3
];
[
invocation
setArgument
:
&
searchString
atIndex
:
3
];
timer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1.0
invocation
:
invocation
repeats
:
NO
];
timer
=
[
NSTimer
scheduledTimerWithTimeInterval
:
1.0
invocation
:
invocation
repeats
:
NO
];
return
NO
;
//
Do
not
refresh
the
table
yet
,
wait
until
the
server
returns
}
else
{
__
weak
CISDOBTableSearchState
*
weakSelf
=
self
;
NSMutableArray
*
emptyResult
=
[
NSMutableArray
arrayWithCapacity
:
0
];
weakSelf
.
filteredResults
=
emptyResult
;
return
YES
;
}
}
return
NO
;
//
Do
not
refresh
the
table
yet
,
wait
until
the
server
returns
}
}
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment